Documentation ¶
Index ¶
- func IsNil(i interface{}) bool
- type Space
- type SpaceHomeQuery
- type SpaceService
- func (s *SpaceService) Add(space *Space) (*Space, error)
- func (s *SpaceService) Get(spacesQuery SpacesQuery) (*resources.Resources[*Space], error)
- func (s *SpaceService) GetAll() ([]*Space, error)
- func (s *SpaceService) GetByID(id string) (*Space, error)
- func (s *SpaceService) GetByIDOrName(idOrName string) (*Space, error)
- func (s *SpaceService) GetByName(name string) (*Space, error)
- func (s *SpaceService) Update(space *Space) (*Space, error)
- type SpacesQuery
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Space ¶
type Space struct { Description string `json:"Description,omitempty"` Slug string `json:"Slug"` // deliberately send empty string IsDefault bool `json:"IsDefault"` Name string `json:"Name" validate:"required,max=20"` SpaceManagersTeamMembers []string `json:"SpaceManagersTeamMembers"` // deliberately send empty array SpaceManagersTeams []string `json:"SpaceManagersTeams"` // deliberately send empty array TaskQueueStopped bool `json:"TaskQueueStopped,omitempty"` resources.Resource }
type SpaceHomeQuery ¶
type SpaceHomeQuery struct {
SpaceID string `uri:"spaceId,omitempty" url:"spaceId,omitempty"`
}
type SpaceService ¶
type SpaceService struct { services.CanDeleteService // contains filtered or unexported fields }
func NewSpaceService ¶
func NewSpaceService(sling *sling.Sling, uriTemplate string, homePath string) *SpaceService
func (*SpaceService) Add ¶
func (s *SpaceService) Add(space *Space) (*Space, error)
Add creates a new space.
func (*SpaceService) Get ¶
func (s *SpaceService) Get(spacesQuery SpacesQuery) (*resources.Resources[*Space], error)
Get returns a collection of spaces 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 (*SpaceService) GetAll ¶
func (s *SpaceService) GetAll() ([]*Space, error)
GetAll returns all spaces. If none can be found or an error occurs, it returns an empty collection.
func (*SpaceService) GetByID ¶
func (s *SpaceService) GetByID(id string) (*Space, error)
GetByID returns the space that matches the input ID. If one cannot be found, it returns nil and an error.
func (*SpaceService) GetByIDOrName ¶
func (s *SpaceService) GetByIDOrName(idOrName string) (*Space, error)
GetByIDOrName returns the space that matches the input ID or name. If one cannot be found, it returns nil and an error.
type SpacesQuery ¶
type SpacesQuery struct { IDs []string `uri:"ids,omitempty" url:"ids,omitempty"` Name string `uri:"name,omitempty" url:"name,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"` }
Click to show internal directories.
Click to hide internal directories.