All URIs are relative to http://localhost
| Method | HTTP request | Description |
|---|---|---|
| CreateSubject | Put /security/subjects/{subject} | Create a subject |
| DeleteSubject | Delete /security/subjects/{subject} | Delete a subject |
| GetSubject | Get /security/subjects/{subject} | Get subject |
| ListSubjects | Get /security/subjects | List subjects |
CreateSubject(ctx, subject).CreateSubject(createSubject).Execute()
Create a subject
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
subject := "subject_example" // string |
createSubject := *openapiclient.NewCreateSubject("Query_example", "Version_example") // CreateSubject |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SubjectApi.CreateSubject(context.Background(), subject).CreateSubject(createSubject).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SubjectApi.CreateSubject``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| subject | string |
Other parameters are passed through a pointer to a apiCreateSubjectRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
createSubject | CreateSubject | |
(empty response body)
ApiToken, ServiceBearer, ServiceToken
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteSubject(ctx, subject).Execute()
Delete a subject
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
subject := "subject_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SubjectApi.DeleteSubject(context.Background(), subject).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SubjectApi.DeleteSubject``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| subject | string |
Other parameters are passed through a pointer to a apiDeleteSubjectRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
(empty response body)
ApiToken, ServiceBearer, ServiceToken
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SubjectConfig GetSubject(ctx, subject).Execute()
Get subject
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
subject := "subject_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SubjectApi.GetSubject(context.Background(), subject).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SubjectApi.GetSubject``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetSubject`: SubjectConfig
fmt.Fprintf(os.Stdout, "Response from `SubjectApi.GetSubject`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| subject | string |
Other parameters are passed through a pointer to a apiGetSubjectRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
ApiToken, ServiceBearer, ServiceToken
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]SubjectConfig ListSubjects(ctx).Execute()
List subjects
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SubjectApi.ListSubjects(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SubjectApi.ListSubjects``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListSubjects`: []SubjectConfig
fmt.Fprintf(os.Stdout, "Response from `SubjectApi.ListSubjects`: %v\n", resp)
}This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiListSubjectsRequest struct via the builder pattern
ApiToken, ServiceBearer, ServiceToken
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]