Documentation
¶
Overview ¶
Package workspace_roles contains workspace-role management functionality on SSS.
Example to Create a workspace-role
workspaceID := "ws00000000001" userID := "ecid0000000001" createOpts := workspace_roles.CreateOpts{ UserID: userID, WorkspaceID: workspaceID, } role, err := workspace_roles.Create(client, createOpts).Extract() if err != nil { panic(err) } fmt.Printf("%+v\n", role)
Example to Delete a workspace-role
workspaceID := "ws00000000001" userID := "ecid00000000001" result := workspace_roles.Delete(client, workspaceID, userID) if result.Err != nil { panic(result.Err) }
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateOpts ¶
type CreateOpts struct { UserID string `json:"user_id" required:"true"` WorkspaceID string `json:"workspace_id" required:"true"` }
CreateOpts represents parameters used to create a workspace-role.
func (CreateOpts) ToWorkspaceRoleCreateMap ¶
func (opts CreateOpts) ToWorkspaceRoleCreateMap() (map[string]interface{}, error)
ToWorkspaceRoleCreateMap formats a CreateOpts into a create request.
type CreateOptsBuilder ¶
CreateOptsBuilder allows extensions to add additional parameters to the Create request.
type CreateResult ¶
type CreateResult struct {
// contains filtered or unexported fields
}
CreateResult is the result of a Create request. Call its Extract method to interpret it as a Workspace-Role.
func Create ¶
func Create(client *eclcloud.ServiceClient, opts CreateOptsBuilder) (r CreateResult)
Create creates a new workspace-role.
func (CreateResult) Extract ¶
func (r CreateResult) Extract() (*WorkspaceRole, error)
Extract interprets any projectResults as a Workspace-Role.
type DeleteResult ¶
type DeleteResult struct {
eclcloud.ErrResult
}
DeleteResult is the result of a Delete request. Call its ExtractErr method to determine if the request succeeded or failed.
func Delete ¶
func Delete(client *eclcloud.ServiceClient, workspaceID string, userID string) (r DeleteResult)
Delete deletes a workspace-role.