channels

package
v2.49.2 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2024 License: Apache-2.0 Imports: 13 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteByID added in v2.33.0

func DeleteByID(client newclient.Client, spaceID string, ID string) error

DeleteById deletes the channel based on the ID provided as input.

func Get added in v2.33.0

func Get(client newclient.Client, spaceID string, channelsQuery Query) (*resources.Resources[*Channel], error)

Get returns a collection of channels based on the criteria defined by its input query parameter.

func IsNil

func IsNil(i interface{}) bool

Types

type Channel

type Channel struct {
	Description       string                   `json:"Description,omitempty"`
	IsDefault         bool                     `json:"IsDefault"`
	LifecycleID       string                   `json:"LifecycleId,omitempty"`
	Name              string                   `json:"Name" validate:"required,notblank,notall"`
	ProjectID         string                   `json:"ProjectId" validate:"required,notblank"`
	Rules             []ChannelRule            `json:"Rules,omitempty"`
	SpaceID           string                   `json:"SpaceId,omitempty"`
	TenantTags        []string                 `json:"TenantTags,omitempty"`
	GitReferenceRules []string                 `json:"GitReferenceRules,omitempty"`
	GitResourceRules  []ChannelGitResourceRule `json:"GitResourceRules,omitempty"`

	resources.Resource
}

func Add added in v2.33.0

func Add(client newclient.Client, channel *Channel) (*Channel, error)

Add creates a new channel.

func GetAll added in v2.34.0

func GetAll(client newclient.Client, spaceID string) ([]*Channel, error)

GetAll returns all channels. If an error occurs, it returns nil.

func GetByID added in v2.33.0

func GetByID(client newclient.Client, spaceID string, ID string) (*Channel, error)

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

func NewChannel

func NewChannel(name string, projectID string) *Channel

func Update added in v2.33.0

func Update(client newclient.Client, channel *Channel) (*Channel, error)

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

func (Channel) Validate

func (c Channel) Validate() error

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

type ChannelGitResourceRule added in v2.44.0

type ChannelGitResourceRule struct {
	Id                   string                                          `json:"Id,omitempty"`
	GitDependencyActions []gitdependencies.DeploymentActionGitDependency `json:"GitDependencyActions,omitempty"`
	Rules                []string                                        `json:"Rules,omitempty"`
}

type ChannelRule

type ChannelRule struct {
	ActionPackages []packages.DeploymentActionPackage `json:"ActionPackages,omitempty"`
	ID             string                             `json:"Id,omitempty"`
	Tag            string                             `json:"Tag,omitempty"`

	//Use the NuGet or Maven versioning syntax (depending on the feed type)
	//to specify the range of versions to include
	VersionRange string `json:"VersionRange,omitempty"`

	resources.Resource
}

type ChannelService

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

func NewChannelService

func NewChannelService(sling *sling.Sling, uriTemplate string, versionRuleTestPath string) *ChannelService

func (*ChannelService) Add deprecated

func (s *ChannelService) Add(channel *Channel) (*Channel, error)

Add creates a new channel.

Deprecated: use channels.Add

func (*ChannelService) Get deprecated

func (s *ChannelService) Get(channelsQuery Query) (*resources.Resources[*Channel], error)

Get returns a collection of channels 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 channels.Get

func (*ChannelService) GetAll

func (s *ChannelService) GetAll() ([]*Channel, error)

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

Depreacted: use channels.GetAll

func (*ChannelService) GetByID deprecated

func (s *ChannelService) GetByID(id string) (*Channel, error)

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

Deprecated: use channels.GetByID

func (*ChannelService) Update deprecated

func (s *ChannelService) Update(channel *Channel) (*Channel, error)

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

Deprecated: use channels.Update

type Query

type Query 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"`
}

type VersionRuleTestQuery

type VersionRuleTestQuery struct {
	FeedType      string `uri:"feedType,omitempty" url:"feedType,omitempty"`
	PreReleaseTag string `uri:"preReleaseTag,omitempty" url:"preReleaseTag,omitempty"`
	Version       string `uri:"version,omitempty" url:"version,omitempty"`
	VersionRange  string `uri:"versionRange,omitempty" url:"versionRange,omitempty"`
}

Jump to

Keyboard shortcuts

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