artifacts

package
v2.40.3 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsNil

func IsNil(i interface{}) bool

Types

type Artifact

type Artifact struct {
	Created          *time.Time `json:"Created,omitempty"`
	Filename         string     `json:"Filename" validate:"required"`
	LogCorrelationID string     `json:"LogCorrelationId,omitempty"`
	ServerTaskID     string     `json:"ServerTaskId,omitempty"`
	Source           string     `json:"Source,omitempty"`
	SpaceID          string     `json:"SpaceId,omitempty"`

	resources.Resource
}

Artifact represents an artifact.

func NewArtifact

func NewArtifact(filename string) *Artifact

NewArtifact creates and initializes an artifact.

type ArtifactService

type ArtifactService struct {
	services.CanDeleteService
}

ArtifactService handles communication for any operations in the Octopus API that pertain to artifacts.

func NewArtifactService

func NewArtifactService(sling *sling.Sling, uriTemplate string) *ArtifactService

NewArtifactService returns an artifactService with a preconfigured client.

func (*ArtifactService) Add

func (s *ArtifactService) Add(artifact *Artifact) (*Artifact, error)

Add creates a new artifact.

func (*ArtifactService) Get

func (s *ArtifactService) Get(artifactsQuery Query) (*resources.Resources[*Artifact], error)

Get returns a collection of artifacts 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 (*ArtifactService) GetAll

func (s *ArtifactService) GetAll() ([]*Artifact, error)

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

func (*ArtifactService) GetByID

func (s *ArtifactService) GetByID(id string) (*Artifact, error)

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

func (*ArtifactService) Update

func (s *ArtifactService) Update(artifact Artifact) (*Artifact, error)

Update modifies an Artifact based on the one provided as input.

type Query

type Query struct {
	IDs         []string `uri:"ids,omitempty" url:"ids,omitempty"`
	Order       string   `uri:"order" url:"order,omitempty"`
	PartialName string   `uri:"partialName,omitempty" url:"partialName,omitempty"`
	Regarding   string   `uri:"regarding,omitempty" url:"regarding,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