resource

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package resource contains the types used for interacting with Concourse CI.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CheckRequest

type CheckRequest struct {
	Source  Source  `json:"source"`
	Version Version `json:"version"`
}

type InOutResponse

type InOutResponse struct {
	Version  Version        `json:"version"`
	Metadata []MetadataPair `json:"metadata"`
}

type InParams

type InParams struct {
	Globs []string `json:"globs"`
}

type InRequest

type InRequest struct {
	Source  Source   `json:"source"`
	Version *Version `json:"version"`
	Params  InParams `json:"params"`
}

type MetadataPair

type MetadataPair struct {
	Name     string `json:"name"`
	Value    string `json:"value"`
	URL      string `json:"url"`
	Markdown bool   `json:"markdown"`
}

func MetadataFromRelease

func MetadataFromRelease(release *gitea.Release) []MetadataPair

type OutParams

type OutParams struct {
	NamePath   string `json:"name_path"`
	BodyPath   string `json:"body_path"`
	TagPath    string `json:"tag_path"`
	TargetPath string `json:"target_path"`
	IDPath     string `json:"id_path"`

	Globs []string `json:"globs"`
}

type OutRequest

type OutRequest struct {
	Source Source    `json:"source"`
	Params OutParams `json:"params"`
}

type Source

type Source struct {
	// Required
	GiteaURL   string `json:"gitea_url"`
	Owner      string `json:"owner"`
	Repository string `json:"repository"`

	// Optional
	AccessToken      string `json:"access_token"`
	SemverConstraint string `json:"semver_constraint"`
	PreRelease       bool   `json:"pre_release"`
}

type Version

type Version struct {
	Tag       string    `json:"tag,omitempty"`
	ID        string    `json:"id"`
	Timestamp time.Time `json:"timestamp"`
}

func VersionFromRelease

func VersionFromRelease(release *gitea.Release) Version

Jump to

Keyboard shortcuts

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