userroles

package
v2.55.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2024 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteByID added in v2.33.0

func DeleteByID(client newclient.Client, id string) error

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.

func IsNil

func IsNil(i interface{}) bool

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

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 Add added in v2.33.0

func Add(client newclient.Client, userRole *UserRole) (*UserRole, error)

Add creates a new user role.

func GetByID added in v2.33.0

func GetByID(client newclient.Client, 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.

func NewUserRole

func NewUserRole(name string) *UserRole

NewUserRole initializes a user role with a name.

func Update added in v2.33.0

func Update(client newclient.Client, userRole *UserRole) (*UserRole, error)

Update modifies a user role based on the one provided as input.

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

type UserRolesQuery

type UserRolesQuery struct {
	IDs         []string `uri:"ids,omitempty" url:"ids,omitempty"`
	PartialName string   `uri:"partialName,omitempty" url:"partialName,omitempty"`
	Skip        int      `uri:"skip,omitempty" url:"skip,omitempty"`
	Take        int      `uri:"take,omitempty" url:"take,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL