Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIClient ¶
type APIClient struct { AccessToken string // contains filtered or unexported fields }
func (*APIClient) GetPrincipals ¶
func (c *APIClient) GetPrincipals(ctx context.Context, opts ...QueryParam) (*PrincipalList, *http.Response, error)
GetPrincipals returns the list of user's in the current users organization/tenant
type Config ¶
type Config struct { // HTTPClient is a custom HTTP client HTTPClient *http.Client // Debug enables debug-level logging Debug bool // BaseURL sets a custom API server base URL BaseURL *url.URL }
APIConfig defines the available configuration options to customize the API client settings
type PrincipalAPI ¶
type PrincipalAPI interface {
GetPrincipals(ctx context.Context, opts ...QueryParam) (*PrincipalList, *http.Response, error)
}
PrincipalAPI is the API definition for the RBAC Principal API
func NewPrincipalAPIClient ¶
func NewPrincipalAPIClient(cfg *Config) PrincipalAPI
NewPrincipalAPIClient returns a new v1 API client using a custom config
type PrincipalList ¶
type QueryParam ¶ added in v0.29.1
QueryParam is a function defining the query param options return signature
func WithBoolQueryParam ¶ added in v0.29.1
func WithBoolQueryParam(key string, value bool) QueryParam
WithIntParam accepts a boolean query parameter and formats it as a string
func WithIntQueryParam ¶ added in v0.29.1
func WithIntQueryParam(key string, value int) QueryParam
WithIntQueryParam accepts an integer query parameter and formats it as a string
func WithQueryParam ¶ added in v0.29.1
func WithQueryParam(key string, value string) QueryParam
WithQueryParam accepts a string query parameter
type RbacAPI ¶
type RbacAPI struct {
PrincipalAPI func() PrincipalAPI
}
RbacAPI defines a collection of APIs grouped under the RBAC API