tagsets

package
v2.16.1 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2022 License: Apache-2.0 Imports: 7 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsNil

func IsNil(i interface{}) bool

Types

type Tag

type Tag struct {
	CanonicalTagName string `json:"CanonicalTagName,omitempty"`
	Color            string `json:"Color"`
	Description      string `json:"Description"`
	ID               string `json:"Id,omitempty"`
	Name             string `json:"Name"`
	SortOrder        int    `json:"SortOrder,omitempty"`
}

func NewTag added in v2.3.0

func NewTag(name string, color string) *Tag

NewTag initializes a tag with a name and a color.

type TagSet

type TagSet struct {
	Description string `json:"Description"`
	Name        string `json:"Name"`
	SortOrder   int32  `json:"SortOrder,omitempty"`
	SpaceID     string `json:"SpaceId,omitempty"`
	Tags        []*Tag `json:"Tags,omitempty"`

	resources.Resource
}

func NewTagSet

func NewTagSet(name string) *TagSet

NewTagSet initializes a TagSet with a name.

type TagSetService

type TagSetService struct {
	services.CanDeleteService
	// contains filtered or unexported fields
}

func NewTagSetService

func NewTagSetService(sling *sling.Sling, uriTemplate string, sortOrderPath string) *TagSetService

func (*TagSetService) Add

func (s *TagSetService) Add(tagSet *TagSet) (*TagSet, error)

Add creates a new tag set.

func (*TagSetService) Get

func (s *TagSetService) Get(tagSetsQuery TagSetsQuery) (*resources.Resources[*TagSet], error)

Get returns a collection of tag sets 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 (*TagSetService) GetAll

func (s *TagSetService) GetAll() ([]*TagSet, error)

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

func (*TagSetService) GetByID

func (s *TagSetService) GetByID(id string) (*TagSet, error)

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

func (*TagSetService) GetByName

func (s *TagSetService) GetByName(name string) (*TagSet, error)

GetByName performs a lookup and returns the TagSet with a matching name.

func (*TagSetService) Update

func (s *TagSetService) Update(tagSet *TagSet) (*TagSet, error)

Update modifies a tag set based on the one provided as input.

type TagSetsQuery

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