spaces

package
v2.30.0 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2023 License: Apache-2.0 Imports: 9 Imported by: 16

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsNil

func IsNil(i interface{}) bool

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"`

	resources.Resource
}

func NewSpace

func NewSpace(name string) *Space

NewSpace initializes a Space with a name.

func (*Space) GetName added in v2.2.0

func (s *Space) GetName() string

GetName returns the name of the space.

func (*Space) SetName added in v2.3.0

func (s *Space) SetName(name string)

SetName sets the name of the space.

func (*Space) Validate

func (s *Space) Validate() error

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

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.

func (*SpaceService) GetByName

func (s *SpaceService) GetByName(name string) (*Space, error)

GetByName returns the space that matches the input ID or name. If one cannot be found, it returns nil and an error.

func (*SpaceService) Update

func (s *SpaceService) Update(space *Space) (*Space, error)

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

type SpacesQuery

type SpacesQuery 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