Documentation
¶
Index ¶
- func CacheExpires(r *http.Response) time.Time
- func IsNil(i interface{}) bool
- func NewConfiguration() *config.Configuration
- func ParameterValueToString(obj interface{}, key string) string
- func PtrBool(v bool) *bool
- func PtrFloat32(v float32) *float32
- func PtrFloat64(v float64) *float64
- func PtrInt(v int) *int
- func PtrInt32(v int32) *int32
- func PtrInt64(v int64) *int64
- func PtrString(v string) *string
- func PtrTime(v time.Time) *time.Time
- type APIClient
- func (a *APIClient) AddMembers(ctx context.Context, resourceId string) ApiAddMembersRequest
- func (a *APIClient) AddMembersExecute(ctx context.Context, resourceId string) (*MembersResponse, error)
- func (c *APIClient) GetConfig() *config.Configuration
- func (a *APIClient) ListMembers(ctx context.Context, resourceType string, resourceId string) ApiListMembersRequest
- func (a *APIClient) ListMembersExecute(ctx context.Context, resourceType string, resourceId string) (*ListMembersResponse, error)
- func (a *APIClient) ListPermissions(ctx context.Context) ApiListPermissionsRequest
- func (a *APIClient) ListPermissionsExecute(ctx context.Context) (*ListPermissionsResponse, error)
- func (a *APIClient) ListRoles(ctx context.Context, resourceType string, resourceId string) ApiListRolesRequest
- func (a *APIClient) ListRolesExecute(ctx context.Context, resourceType string, resourceId string) (*RolesResponse, error)
- func (a *APIClient) ListUserMemberships(ctx context.Context, email string) ApiListUserMembershipsRequest
- func (a *APIClient) ListUserMembershipsExecute(ctx context.Context, email string) (*ListUserMembershipsResponse, error)
- func (a *APIClient) RemoveMembers(ctx context.Context, resourceId string) ApiRemoveMembersRequest
- func (a *APIClient) RemoveMembersExecute(ctx context.Context, resourceId string) (*MembersResponse, error)
- type AddMembersPayload
- type AddRolesPayload
- type AddRolesPayloadItem
- type ApiAddMembersRequest
- type ApiListMembersRequest
- type ApiListPermissionsRequest
- type ApiListRolesRequest
- type ApiListUserMembershipsRequest
- func (r ApiListUserMembershipsRequest) Execute() (*ListUserMembershipsResponse, error)
- func (r ApiListUserMembershipsRequest) ParentResourceId(parentResourceId string) ApiListUserMembershipsRequest
- func (r ApiListUserMembershipsRequest) ResourceId(resourceId string) ApiListUserMembershipsRequest
- func (r ApiListUserMembershipsRequest) ResourceType(resourceType string) ApiListUserMembershipsRequest
- type ApiRemoveMembersRequest
- type Consistency
- type CreateResourcePayload
- type CreateResourceResponse
- type DefaultApiService
- type DeleteResourceResponse
- type DeleteSubjectResponse
- type EnforcePermissionPayload
- type ErrorResponse
- type ExistingPermission
- type ListMembersResponse
- type ListPermissionsResponse
- type ListSubjectIdsResponse
- type ListSubjectsResponse
- type ListUserMembershipsResponse
- type ListUserPermissionsResponse
- type MappedNullable
- type Member
- type MembersResponse
- type NullableBool
- type NullableFloat32
- type NullableFloat64
- type NullableInt
- type NullableInt32
- type NullableInt64
- type NullableString
- type NullableTime
- type Permission
- type PermissionRequest
- type RemoveMembersPayload
- type RemoveRoleRequest
- type RemoveRolesPayload
- type Resource
- type Role
- type RolesResponse
- type Subject
- type TransferSubjectMembershipsPayload
- type UserMembership
- type UserPermission
- type UserResourcesResponse
- type ValidateChildMembersPayload
- type WriteSchemaPayload
- type WriteSchemaResponse
- type Zookie
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CacheExpires ¶
CacheExpires helper function to determine remaining time before repeating a request.
func NewConfiguration ¶
func NewConfiguration() *config.Configuration
NewConfiguration returns a new Configuration object
func ParameterValueToString ¶
func PtrFloat32 ¶
PtrFloat32 is a helper routine that returns a pointer to given float value.
func PtrFloat64 ¶
PtrFloat64 is a helper routine that returns a pointer to given float value.
Types ¶
type APIClient ¶
type APIClient struct {
// contains filtered or unexported fields
}
APIClient manages communication with the STACKIT Membership API API v2.0 In most cases there should be only one, shared, APIClient.
func NewAPIClient ¶
func NewAPIClient(opts ...config.ConfigurationOption) (*APIClient, error)
NewAPIClient creates a new API client. Optionally receives configuration options
func (*APIClient) AddMembers ¶
func (a *APIClient) AddMembers(ctx context.Context, resourceId string) ApiAddMembersRequest
AddMembers Add members to a resource
Add members to the given resource with specified roles.
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param resourceId @return ApiAddMembersRequest
func (*APIClient) AddMembersExecute ¶
func (*APIClient) GetConfig ¶
func (c *APIClient) GetConfig() *config.Configuration
Allow modification of underlying config for alternate implementations and testing Caution: modifying the configuration while live can cause data races and potentially unwanted behavior
func (*APIClient) ListMembers ¶
func (a *APIClient) ListMembers(ctx context.Context, resourceType string, resourceId string) ApiListMembersRequest
ListMembers Get members to a resource
List members of the given resource.
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param resourceType @param resourceId @return ApiListMembersRequest
func (*APIClient) ListMembersExecute ¶
func (*APIClient) ListPermissions ¶
func (a *APIClient) ListPermissions(ctx context.Context) ApiListPermissionsRequest
ListPermissions Get available permissions
Get available permissions
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiListPermissionsRequest
func (*APIClient) ListPermissionsExecute ¶
func (a *APIClient) ListPermissionsExecute(ctx context.Context) (*ListPermissionsResponse, error)
func (*APIClient) ListRoles ¶
func (a *APIClient) ListRoles(ctx context.Context, resourceType string, resourceId string) ApiListRolesRequest
ListRoles Get roles and permissions of a resource
Get roles and permissions of a resource
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param resourceType @param resourceId @return ApiListRolesRequest
func (*APIClient) ListRolesExecute ¶
func (*APIClient) ListUserMemberships ¶
func (a *APIClient) ListUserMemberships(ctx context.Context, email string) ApiListUserMembershipsRequest
ListUserMemberships List memberships of a user
List memberships of a user. An administrative access is needed to list any user's memberships, while the user can do it on his/her own email. You can use filters to scope the request to a project/folder/organization. In this case -if caller is not the subject-, owner permissions are required. Because of hierarchical role bindings, the user might have permissions on more resources.
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param email @return ApiListUserMembershipsRequest
func (*APIClient) ListUserMembershipsExecute ¶
func (*APIClient) RemoveMembers ¶
func (a *APIClient) RemoveMembers(ctx context.Context, resourceId string) ApiRemoveMembersRequest
RemoveMembers Remove members from a resource
Remove members from the given resource with specified roles.
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param resourceId @return ApiRemoveMembersRequest
func (*APIClient) RemoveMembersExecute ¶
type AddMembersPayload ¶
type AddRolesPayload ¶
type AddRolesPayload struct { // REQUIRED ResourceType *string `json:"resourceType"` // REQUIRED Roles *[]AddRolesPayloadItem `json:"roles"` }
type AddRolesPayloadItem ¶
type AddRolesPayloadItem struct { // REQUIRED Description *string `json:"description"` // REQUIRED Name *string `json:"name"` // REQUIRED Permissions *[]PermissionRequest `json:"permissions"` }
type ApiAddMembersRequest ¶
type ApiAddMembersRequest struct {
// contains filtered or unexported fields
}
func (ApiAddMembersRequest) AddMembersPayload ¶
func (r ApiAddMembersRequest) AddMembersPayload(addMembersPayload AddMembersPayload) ApiAddMembersRequest
func (ApiAddMembersRequest) Execute ¶
func (r ApiAddMembersRequest) Execute() (*MembersResponse, error)
type ApiListMembersRequest ¶
type ApiListMembersRequest struct {
// contains filtered or unexported fields
}
func (ApiListMembersRequest) Execute ¶
func (r ApiListMembersRequest) Execute() (*ListMembersResponse, error)
func (ApiListMembersRequest) Subject ¶
func (r ApiListMembersRequest) Subject(subject string) ApiListMembersRequest
type ApiListPermissionsRequest ¶
type ApiListPermissionsRequest struct {
// contains filtered or unexported fields
}
func (ApiListPermissionsRequest) Execute ¶
func (r ApiListPermissionsRequest) Execute() (*ListPermissionsResponse, error)
func (ApiListPermissionsRequest) ResourceType ¶
func (r ApiListPermissionsRequest) ResourceType(resourceType string) ApiListPermissionsRequest
type ApiListRolesRequest ¶
type ApiListRolesRequest struct {
// contains filtered or unexported fields
}
func (ApiListRolesRequest) Execute ¶
func (r ApiListRolesRequest) Execute() (*RolesResponse, error)
type ApiListUserMembershipsRequest ¶
type ApiListUserMembershipsRequest struct {
// contains filtered or unexported fields
}
func (ApiListUserMembershipsRequest) Execute ¶
func (r ApiListUserMembershipsRequest) Execute() (*ListUserMembershipsResponse, error)
func (ApiListUserMembershipsRequest) ParentResourceId ¶
func (r ApiListUserMembershipsRequest) ParentResourceId(parentResourceId string) ApiListUserMembershipsRequest
func (ApiListUserMembershipsRequest) ResourceId ¶
func (r ApiListUserMembershipsRequest) ResourceId(resourceId string) ApiListUserMembershipsRequest
func (ApiListUserMembershipsRequest) ResourceType ¶
func (r ApiListUserMembershipsRequest) ResourceType(resourceType string) ApiListUserMembershipsRequest
type ApiRemoveMembersRequest ¶
type ApiRemoveMembersRequest struct {
// contains filtered or unexported fields
}
func (ApiRemoveMembersRequest) Execute ¶
func (r ApiRemoveMembersRequest) Execute() (*MembersResponse, error)
func (ApiRemoveMembersRequest) RemoveMembersPayload ¶
func (r ApiRemoveMembersRequest) RemoveMembersPayload(removeMembersPayload RemoveMembersPayload) ApiRemoveMembersRequest
type Consistency ¶
type CreateResourcePayload ¶
type CreateResourceResponse ¶
type CreateResourceResponse struct { Members *[]Member `json:"members,omitempty"` // REQUIRED ParentId *string `json:"parentId"` // REQUIRED ParentType *string `json:"parentType"` ResourceAlias *string `json:"resourceAlias,omitempty"` // REQUIRED ResourceId *string `json:"resourceId"` // REQUIRED ResourceType *string `json:"resourceType"` WrittenAt *Zookie `json:"writtenAt,omitempty"` }
type DeleteResourceResponse ¶
type DeleteResourceResponse struct {
WrittenAt *Zookie `json:"writtenAt,omitempty"`
}
type DeleteSubjectResponse ¶
type EnforcePermissionPayload ¶
type EnforcePermissionPayload struct { // REQUIRED Actions *[]string `json:"actions"` Consistency *Consistency `json:"consistency,omitempty"` // REQUIRED Resource *string `json:"resource"` // REQUIRED ResourceType *string `json:"resourceType"` // REQUIRED Subject *string `json:"subject"` }
type ErrorResponse ¶
type ExistingPermission ¶
type ListMembersResponse ¶
type ListPermissionsResponse ¶
type ListPermissionsResponse struct { // REQUIRED Permissions *[]Permission `json:"permissions"` }
type ListSubjectIdsResponse ¶
type ListSubjectsResponse ¶
type ListSubjectsResponse struct { // REQUIRED Items *[]Subject `json:"items"` }
type ListUserMembershipsResponse ¶
type ListUserMembershipsResponse struct { // REQUIRED Items *[]UserMembership `json:"items"` }
type ListUserPermissionsResponse ¶
type ListUserPermissionsResponse struct { // REQUIRED Items *[]UserPermission `json:"items"` }
type MappedNullable ¶
type MembersResponse ¶
type NullableBool ¶
type NullableBool struct {
// contains filtered or unexported fields
}
func NewNullableBool ¶
func NewNullableBool(val *bool) *NullableBool
func (NullableBool) Get ¶
func (v NullableBool) Get() *bool
func (NullableBool) IsSet ¶
func (v NullableBool) IsSet() bool
func (NullableBool) MarshalJSON ¶
func (v NullableBool) MarshalJSON() ([]byte, error)
func (*NullableBool) Set ¶
func (v *NullableBool) Set(val *bool)
func (*NullableBool) UnmarshalJSON ¶
func (v *NullableBool) UnmarshalJSON(src []byte) error
func (*NullableBool) Unset ¶
func (v *NullableBool) Unset()
type NullableFloat32 ¶
type NullableFloat32 struct {
// contains filtered or unexported fields
}
func NewNullableFloat32 ¶
func NewNullableFloat32(val *float32) *NullableFloat32
func (NullableFloat32) Get ¶
func (v NullableFloat32) Get() *float32
func (NullableFloat32) IsSet ¶
func (v NullableFloat32) IsSet() bool
func (NullableFloat32) MarshalJSON ¶
func (v NullableFloat32) MarshalJSON() ([]byte, error)
func (*NullableFloat32) Set ¶
func (v *NullableFloat32) Set(val *float32)
func (*NullableFloat32) UnmarshalJSON ¶
func (v *NullableFloat32) UnmarshalJSON(src []byte) error
func (*NullableFloat32) Unset ¶
func (v *NullableFloat32) Unset()
type NullableFloat64 ¶
type NullableFloat64 struct {
// contains filtered or unexported fields
}
func NewNullableFloat64 ¶
func NewNullableFloat64(val *float64) *NullableFloat64
func (NullableFloat64) Get ¶
func (v NullableFloat64) Get() *float64
func (NullableFloat64) IsSet ¶
func (v NullableFloat64) IsSet() bool
func (NullableFloat64) MarshalJSON ¶
func (v NullableFloat64) MarshalJSON() ([]byte, error)
func (*NullableFloat64) Set ¶
func (v *NullableFloat64) Set(val *float64)
func (*NullableFloat64) UnmarshalJSON ¶
func (v *NullableFloat64) UnmarshalJSON(src []byte) error
func (*NullableFloat64) Unset ¶
func (v *NullableFloat64) Unset()
type NullableInt ¶
type NullableInt struct {
// contains filtered or unexported fields
}
func NewNullableInt ¶
func NewNullableInt(val *int) *NullableInt
func (NullableInt) Get ¶
func (v NullableInt) Get() *int
func (NullableInt) IsSet ¶
func (v NullableInt) IsSet() bool
func (NullableInt) MarshalJSON ¶
func (v NullableInt) MarshalJSON() ([]byte, error)
func (*NullableInt) Set ¶
func (v *NullableInt) Set(val *int)
func (*NullableInt) UnmarshalJSON ¶
func (v *NullableInt) UnmarshalJSON(src []byte) error
func (*NullableInt) Unset ¶
func (v *NullableInt) Unset()
type NullableInt32 ¶
type NullableInt32 struct {
// contains filtered or unexported fields
}
func NewNullableInt32 ¶
func NewNullableInt32(val *int32) *NullableInt32
func (NullableInt32) Get ¶
func (v NullableInt32) Get() *int32
func (NullableInt32) IsSet ¶
func (v NullableInt32) IsSet() bool
func (NullableInt32) MarshalJSON ¶
func (v NullableInt32) MarshalJSON() ([]byte, error)
func (*NullableInt32) Set ¶
func (v *NullableInt32) Set(val *int32)
func (*NullableInt32) UnmarshalJSON ¶
func (v *NullableInt32) UnmarshalJSON(src []byte) error
func (*NullableInt32) Unset ¶
func (v *NullableInt32) Unset()
type NullableInt64 ¶
type NullableInt64 struct {
// contains filtered or unexported fields
}
func NewNullableInt64 ¶
func NewNullableInt64(val *int64) *NullableInt64
func (NullableInt64) Get ¶
func (v NullableInt64) Get() *int64
func (NullableInt64) IsSet ¶
func (v NullableInt64) IsSet() bool
func (NullableInt64) MarshalJSON ¶
func (v NullableInt64) MarshalJSON() ([]byte, error)
func (*NullableInt64) Set ¶
func (v *NullableInt64) Set(val *int64)
func (*NullableInt64) UnmarshalJSON ¶
func (v *NullableInt64) UnmarshalJSON(src []byte) error
func (*NullableInt64) Unset ¶
func (v *NullableInt64) Unset()
type NullableString ¶
type NullableString struct {
// contains filtered or unexported fields
}
func NewNullableString ¶
func NewNullableString(val *string) *NullableString
func (NullableString) Get ¶
func (v NullableString) Get() *string
func (NullableString) IsSet ¶
func (v NullableString) IsSet() bool
func (NullableString) MarshalJSON ¶
func (v NullableString) MarshalJSON() ([]byte, error)
func (*NullableString) Set ¶
func (v *NullableString) Set(val *string)
func (*NullableString) UnmarshalJSON ¶
func (v *NullableString) UnmarshalJSON(src []byte) error
func (*NullableString) Unset ¶
func (v *NullableString) Unset()
type NullableTime ¶
type NullableTime struct {
// contains filtered or unexported fields
}
func NewNullableTime ¶
func NewNullableTime(val *time.Time) *NullableTime
func (NullableTime) Get ¶
func (v NullableTime) Get() *time.Time
func (NullableTime) IsSet ¶
func (v NullableTime) IsSet() bool
func (NullableTime) MarshalJSON ¶
func (v NullableTime) MarshalJSON() ([]byte, error)
func (*NullableTime) Set ¶
func (v *NullableTime) Set(val *time.Time)
func (*NullableTime) UnmarshalJSON ¶
func (v *NullableTime) UnmarshalJSON(src []byte) error
func (*NullableTime) Unset ¶
func (v *NullableTime) Unset()
type Permission ¶
type PermissionRequest ¶
type PermissionRequest struct { // REQUIRED Name *string `json:"name"` }
type RemoveMembersPayload ¶
type RemoveRoleRequest ¶
type RemoveRoleRequest struct { // REQUIRED Name *string `json:"name"` }
type RemoveRolesPayload ¶
type RemoveRolesPayload struct { // REQUIRED ResourceType *string `json:"resourceType"` // REQUIRED Roles *[]RemoveRoleRequest `json:"roles"` }
type Role ¶
type Role struct { // REQUIRED Description *string `json:"description"` // REQUIRED Name *string `json:"name"` // REQUIRED Permissions *[]Permission `json:"permissions"` }
type RolesResponse ¶
type TransferSubjectMembershipsPayload ¶
type TransferSubjectMembershipsPayload struct { // REQUIRED TargetSubjectId *string `json:"targetSubjectId"` }
type UserMembership ¶
type UserPermission ¶
type UserPermission struct { // REQUIRED Permissions *[]ExistingPermission `json:"permissions"` // REQUIRED ResourceId *string `json:"resourceId"` // REQUIRED ResourceType *string `json:"resourceType"` }
type UserResourcesResponse ¶
type WriteSchemaPayload ¶
type WriteSchemaPayload struct { // REQUIRED Schema *string `json:"schema"` }
type WriteSchemaResponse ¶
type WriteSchemaResponse struct { // REQUIRED WrittenAt *Zookie `json:"writtenAt"` }
Source Files
¶
- api_default.go
- client.go
- configuration.go
- model_add_members_payload.go
- model_add_roles_payload.go
- model_add_roles_payload_item.go
- model_consistency.go
- model_create_resource_payload.go
- model_create_resource_response.go
- model_delete_resource_response.go
- model_delete_subject_response.go
- model_enforce_permission_payload.go
- model_error_response.go
- model_existing_permission.go
- model_list_members_response.go
- model_list_permissions_response.go
- model_list_subject_ids_response.go
- model_list_subjects_response.go
- model_list_user_memberships_response.go
- model_list_user_permissions_response.go
- model_member.go
- model_members_response.go
- model_permission.go
- model_permission_request.go
- model_remove_members_payload.go
- model_remove_role_request.go
- model_remove_roles_payload.go
- model_resource.go
- model_role.go
- model_roles_response.go
- model_subject.go
- model_transfer_subject_memberships_payload.go
- model_user_membership.go
- model_user_permission.go
- model_user_resources_response.go
- model_validate_child_members_payload.go
- model_write_schema_payload.go
- model_write_schema_response.go
- model_zookie.go
- utils.go