Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Permission ¶
type Permission struct { Name string `json:"name"` Description string `json:"description,omitempty"` Memberships []members.Member `json:"memberships,omitempty"` }
Permission describes a STACKIT permission
type PermissionList ¶
type PermissionList struct {
Permissions []Permission `json:"permissions,omitempty"`
}
PermissionList is a list of all permissions
type PermissionsService ¶
PermissionsService is the service that handles CRUD functionality for permissions
func (*PermissionsService) GetByEmail ¶
func (svc *PermissionsService) GetByEmail(ctx context.Context, email string, limit, offset int) (up UserPermissions, err error)
GetByEmail returns a list of resources and permissions assigned to a user by their email Reference: https://api.stackit.schwarz/membership-service/openapi.v2.html#operation/get-user-permissions
func (*PermissionsService) List ¶
func (svc *PermissionsService) List(ctx context.Context) (p PermissionList, err error)
List returns the a list of all available permissions Reference: https://api.stackit.schwarz/membership-service/openapi.v2.html#operation/get-permissions
type ResourcePermissions ¶
type ResourcePermissions struct { ResourceID string `json:"resourceId,omitempty"` ResourceType string `json:"resourceType,omitempty"` Permissions []Permission `json:"permissions,omitempty"` }
ResourcePermissions describes the resource and permissions assigned
type UserPermissions ¶
type UserPermissions struct { Items []ResourcePermissions `json:"items,omitempty"` Limit int `json:"limit,omitempty"` Offset int `json:"offset,omitempty"` }
UserPermissions is a struct listing user permissions for every resource