Documentation ¶
Index ¶
- func IsNil(i interface{}) bool
- type Team
- type TeamMembershipQuery
- type TeamService
- func (s *TeamService) Add(team *Team) (*Team, error)
- func (s *TeamService) Delete(team *Team) error
- func (s *TeamService) Get(teamsQuery TeamsQuery) (*resources.Resources[*Team], error)
- func (s *TeamService) GetAll() ([]*Team, error)
- func (s *TeamService) GetByID(id string) (*Team, error)
- func (s *TeamService) GetByPartialName(partialName string) ([]*Team, error)
- func (s *TeamService) GetScopedUserRoles(team Team, query core.SkipTakeQuery) (*resources.Resources[*userroles.ScopedUserRole], error)
- func (s *TeamService) Update(team *Team) (*Team, error)
- type TeamsQuery
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 }
type TeamMembershipQuery ¶
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)
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"` }