userroles

package
v2.17.3 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2022 License: Apache-2.0 Imports: 7 Imported by: 2 modules, 3 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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,omitempty"`
	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 NewUserRole

func NewUserRole(name string) *UserRole

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

func (s *UserRoleService) Add(userRole *UserRole) (*UserRole, error)

Add creates a new user role.

func (*UserRoleService) Get

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.

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

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.

func (*UserRoleService) Update

func (s *UserRoleService) Update(userRole *UserRole) (*UserRole, error)

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

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