Documentation ¶
Index ¶
- func DeleteByID(client newclient.Client, id string) error
- func Get(client newclient.Client, spaceID string, userRolesQuery UserRolesQuery) (*resources.Resources[*UserRole], error)
- func IsNil(i interface{}) bool
- type ScopedUserRole
- type ScopedUserRoleService
- func (s *ScopedUserRoleService) Add(scopedUserRole *ScopedUserRole) (*ScopedUserRole, error)
- func (s *ScopedUserRoleService) Get() (*resources.Resources[*ScopedUserRole], error)
- func (s *ScopedUserRoleService) GetByID(id string) (*ScopedUserRole, error)
- func (s *ScopedUserRoleService) Update(scopedUserRole *ScopedUserRole) (*ScopedUserRole, error)
- type ScopedUserRolesQuery
- type UserRole
- type UserRoleService
- func (s *UserRoleService) Add(userRole *UserRole) (*UserRole, error)deprecated
- func (s *UserRoleService) Get(userRolesQuery UserRolesQuery) (*resources.Resources[*UserRole], error)deprecated
- func (s *UserRoleService) GetAll() ([]*UserRole, error)
- func (s *UserRoleService) GetByID(id string) (*UserRole, error)deprecated
- func (s *UserRoleService) Update(userRole *UserRole) (*UserRole, error)deprecated
- type UserRolesQuery
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteByID ¶ added in v2.33.0
DeleteByID deletes the resource that matches the space ID and input ID.
func Get ¶ added in v2.33.0
func Get(client newclient.Client, spaceID string, userRolesQuery UserRolesQuery) (*resources.Resources[*UserRole], error)
Get returns a collection of user roles based on the criteria defined by its input query parameter. If an error occurs, an empty collection is returned along with the associated error.
Types ¶
type ScopedUserRole ¶
type ScopedUserRole struct { EnvironmentIDs []string `json:"EnvironmentIds,omitempty"` ProjectIDs []string `json:"ProjectIds,omitempty"` ProjectGroupIDs []string `json:"ProjectGroupIds,omitempty"` TeamID string `json:"TeamId" validate:"required"` TenantIDs []string `json:"TenantIds,omitempty"` SpaceID string `json:"SpaceId"` UserRoleID string `json:"UserRoleId" validate:"required"` resources.Resource }
func NewScopedUserRole ¶
func NewScopedUserRole(userRoleId string) *ScopedUserRole
func (*ScopedUserRole) Validate ¶
func (r *ScopedUserRole) Validate() error
Validate checks the state of the scoped user role and returns an error if invalid.
type ScopedUserRoleService ¶
type ScopedUserRoleService struct {
services.CanDeleteService
}
func NewScopedUserRoleService ¶
func NewScopedUserRoleService(sling *sling.Sling, uriTemplate string) *ScopedUserRoleService
func (*ScopedUserRoleService) Add ¶
func (s *ScopedUserRoleService) Add(scopedUserRole *ScopedUserRole) (*ScopedUserRole, error)
func (*ScopedUserRoleService) Get ¶
func (s *ScopedUserRoleService) Get() (*resources.Resources[*ScopedUserRole], error)
Currently no known query params, not even take and skip Query params could exist, but are undocumented in the swagger
func (*ScopedUserRoleService) GetByID ¶
func (s *ScopedUserRoleService) GetByID(id string) (*ScopedUserRole, error)
func (*ScopedUserRoleService) Update ¶
func (s *ScopedUserRoleService) Update(scopedUserRole *ScopedUserRole) (*ScopedUserRole, error)
type ScopedUserRolesQuery ¶
type ScopedUserRolesQuery struct { IDs []string `uri:"ids,omitempty" url:"ids,omitempty"` IncludeSystem bool `uri:"includeSystem,omitempty" url:"includeSystem,omitempty"` PartialName string `uri:"partialName,omitempty" url:"partialName,omitempty"` Skip int `uri:"skip,omitempty" url:"skip,omitempty"` Spaces []string `uri:"spaces,omitempty" url:"spaces,omitempty"` Take int `uri:"take,omitempty" url:"take,omitempty"` }
type UserRole ¶
type UserRole struct { CanBeDeleted bool `json:"CanBeDeleted"` Description string `json:"Description,omitempty"` GrantedSpacePermissions []string `json:"GrantedSpacePermissions"` GrantedSystemPermissions []string `json:"GrantedSystemPermissions"` Name string `json:"Name,omitempty"` SpacePermissionDescriptions []string `json:"SpacePermissionDescriptions"` SupportedRestrictions []string `json:"SupportedRestrictions"` SystemPermissionDescriptions []string `json:"SystemPermissionDescriptions"` resources.Resource }
UserRole represents a user role in Octopus.
func GetByID ¶ added in v2.33.0
GetByID returns the user role that matches the input ID. If one cannot be found, it returns nil and an error.
func NewUserRole ¶
NewUserRole initializes a user role with a name.
type UserRoleService ¶
type UserRoleService struct {
services.CanDeleteService
}
func NewUserRoleService ¶
func NewUserRoleService(sling *sling.Sling, uriTemplate string) *UserRoleService
func (*UserRoleService) Add
deprecated
func (s *UserRoleService) Add(userRole *UserRole) (*UserRole, error)
Add creates a new user role.
Deprecated: Use userroles.Add
func (*UserRoleService) Get
deprecated
func (s *UserRoleService) Get(userRolesQuery UserRolesQuery) (*resources.Resources[*UserRole], error)
Get returns a collection of user roles based on the criteria defined by its input query parameter. If an error occurs, an empty collection is returned along with the associated error.
Deprecated: Use userroles.Get
func (*UserRoleService) GetAll ¶
func (s *UserRoleService) GetAll() ([]*UserRole, error)
GetAll returns all user roles. If none can be found or an error occurs, it returns an empty collection.
func (*UserRoleService) GetByID
deprecated
func (s *UserRoleService) GetByID(id string) (*UserRole, error)
GetByID returns the user role that matches the input ID. If one cannot be found, it returns nil and an error.
Deprecated: Use userroles.GetByID
func (*UserRoleService) Update
deprecated
func (s *UserRoleService) Update(userRole *UserRole) (*UserRole, error)
Update modifies a user role based on the one provided as input.
Deprecated: Use userroles.Update