teams

package
v2.73.0 Latest Latest
Warning

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

Go to latest
Published: May 27, 2025 License: Apache-2.0 Imports: 11 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteByID added in v2.70.0

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

func IsNil

func IsNil(i interface{}) bool

Types

type Team

type Team struct {
	CanBeDeleted           bool                      `json:"CanBeDeleted"`
	CanBeRenamed           bool                      `json:"CanBeRenamed"`
	CanChangeMembers       bool                      `json:"CanChangeMembers"`
	CanChangeRoles         bool                      `json:"CanChangeRoles"`
	Description            string                    `json:"Description,omitempty"`
	ExternalSecurityGroups []core.NamedReferenceItem `json:"ExternalSecurityGroups"`
	MemberUserIDs          []string                  `json:"MemberUserIds"`
	Name                   string                    `json:"Name" validate:"required"`
	SpaceID                string                    `json:"SpaceId,omitempty"`

	resources.Resource
}

func Add added in v2.70.0

func Add(client newclient.Client, team *Team) (*Team, error)

func GetByID added in v2.70.0

func GetByID(client newclient.Client, spaceId string, id string) (*Team, error)

func NewTeam

func NewTeam(name string) *Team

func (*Team) Validate

func (t *Team) Validate() error

Validate checks the state of the team and returns an error if invalid.

type TeamMembershipQuery

type TeamMembershipQuery struct {
	IncludeSystem bool     `uri:"includeSystem,omitempty" url:"includeSystem,omitempty"`
	Spaces        []string `uri:"spaces,omitempty" url:"spaces,omitempty"`
	UserID        string   `uri:"userId,omitempty" url:"userId,omitempty"`
}

type TeamService

type TeamService struct {
	services.CanDeleteService
}

func NewTeamService

func NewTeamService(sling *sling.Sling, uriTemplate string) *TeamService

func (*TeamService) Add

func (s *TeamService) Add(team *Team) (*Team, error)

Add creates a new team.

func (*TeamService) Delete

func (s *TeamService) Delete(team *Team) error

Delete will delete a team if it is not a built-in team (i.e. the field, CanBeDeleted is true). If the team cannot be deleted or an error occurs, it returns an error.

func (*TeamService) Get

func (s *TeamService) Get(teamsQuery TeamsQuery) (*resources.Resources[*Team], error)

Get returns a collection of teams 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 (*TeamService) GetAll

func (s *TeamService) GetAll() ([]*Team, error)

GetAll returns all teams. If none can be found or an error occurs, it returns an empty collection.

func (*TeamService) GetByID

func (s *TeamService) GetByID(id string) (*Team, error)

GetByID returns the team that matches the input ID. If one cannot be found, it returns nil and an error.

func (*TeamService) GetByPartialName

func (s *TeamService) GetByPartialName(partialName string) ([]*Team, error)

GetByPartialName performs a lookup and returns teams with a matching partial name.

func (*TeamService) GetScopedUserRoles

func (s *TeamService) GetScopedUserRoles(team Team, query core.SkipTakeQuery) (*resources.Resources[*userroles.ScopedUserRole], error)

func (*TeamService) Update

func (s *TeamService) Update(team *Team) (*Team, error)

Update modifies a team based on the one provided as input.

type TeamsQuery

type TeamsQuery 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"`
}

Jump to

Keyboard shortcuts

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