spaces

package
v2.62.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 10 Imported by: 16

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get added in v2.33.0

func Get(client newclient.Client, 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 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 GetAll added in v2.33.0

func GetAll(client newclient.Client) ([]*Space, error)

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

func GetByID added in v2.33.0

func GetByID(client newclient.Client, 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 GetDefaultSpace added in v2.33.0

func GetDefaultSpace(client newclient.Client) (*Space, error)

GetDefaultSpace tries to find default space. Returns nil if a default space can not be found.

func NewSpace

func NewSpace(name string) *Space

NewSpace initializes a Space with a name.

func Update added in v2.33.0

func Update(client newclient.Client, space *Space) (*Space, error)

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

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 deprecated

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.

Deprecated: Use spaces.Get

func (*SpaceService) GetAll deprecated

func (s *SpaceService) GetAll() ([]*Space, error)

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

Deprecated: Use spaces.GetAll

func (*SpaceService) GetByID deprecated

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.

Deprecated: Use spaces.GetByID

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 deprecated

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

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

Deprecated: Use spaces.Update

type SpacesQuery

type SpacesQuery struct {
	IDs         []string `uri:"ids,omitempty"`
	PartialName string   `uri:"partialName,omitempty"`
	Skip        int      `uri:"skip,omitempty"`
	Take        int      `uri:"take,omitempty"`
}

Jump to

Keyboard shortcuts

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