channels

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: 11 Imported by: 5 modules, 8 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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

	resources.Resource
}

func NewChannel

func NewChannel(name string, projectID string) *Channel

func (Channel) Validate

func (c Channel) Validate() error

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

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

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

Add creates a new channel.

func (*ChannelService) Get

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.

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.

func (*ChannelService) GetByID

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.

func (*ChannelService) Update

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

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

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