rstuf

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Artifact

type Artifact struct {
	Path string       `json:"path"`
	Info ArtifactInfo `json:"info"`
}

Artifact represents the Artifact structure

type ArtifactInfo

type ArtifactInfo struct {
	Length int            `json:"length"`
	Hashes Hashes         `json:"hashes"`
	Custom map[string]any `json:"custom,omitempty"`
}

ArtifactInfo represents the ArtifactInfo structure

type ArtifactPayload

type ArtifactPayload struct {
	Artifacts         []Artifact `json:"artifacts"`
	AddTaskIDToCustom bool       `json:"add_task_id_to_custom"`
	PublishTargets    bool       `json:"publish_targets"`
}

ArtifactPayload represents the payload structure

type ArtifactsResponse

type ArtifactsResponse struct {
	Artifacts  []string `json:"artifacts"`
	TaskId     string   `json:"task_id"`
	LastUpdate string   `json:"last_update"`
	Message    string   `json:"message"`
}

type Hashes

type Hashes struct {
	Sha256 string `json:"sha256"`
}

Hashes represents the Hashes structure

type Publisher

type Publisher interface {
	Publish(ctx context.Context, gitoid string, payload []byte) error
}

func NewPublisher

func NewPublisher(config *config.Config) Publisher

type RSTUF

type RSTUF struct {
	Host string
}

func (*RSTUF) Publish

func (r *RSTUF) Publish(ctx context.Context, gitoid string, payload []byte) error

type Response

type Response struct {
	Data ArtifactsResponse `json:"data"`
}

Jump to

Keyboard shortcuts

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