discover

package
v0.0.0-...-5763f09 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PROJECT               string = "velocity"
	DockerRepository      string = "dockcenter/velocity"
	SupportedVersionGroup string = "3.0.0"
	DownloadsKey          string = "application"
	DockerBuildWorkflow   string = "docker.yaml"
)

Variables

This section is empty.

Functions

func BuildCommand

func BuildCommand(workflow string, promotion Promotion) string

func GetUniqueTag

func GetUniqueTag(version string, build int) string

Types

type BuildsResponse

type BuildsResponse struct {
	ProjectBase
	Version string         `json:"version"`
	Builds  []VersionBuild `json:"builds"`
}

type Change

type Change struct {
	Commit  string `json:"commit"`
	Summary string `json:"summary"`
	Message string `json:"message"`
}

type DockerImage

type DockerImage struct {
	Architecture string    `json:"architecture"`
	Digest       string    `json:"digest"`
	Features     string    `json:"features"`
	LastPulled   time.Time `json:"last_pulled"`
	LastPushed   time.Time `json:"last_pushed"`
	Os           string    `json:"os"`
	OsFeatures   string    `json:"os_features"`
	OsVersion    string    `json:"os_version"`
	Size         int       `json:"size"`
	Status       string    `json:"status"`
	Variant      string    `json:"variant"`
}

type DockerTag

type DockerTag struct {
	Creator             int           `json:"creator"`
	FullSize            int           `json:"full_size"`
	Id                  int           `json:"id"`
	ImageId             int           `json:"image_id"`
	Images              []DockerImage `json:"images"`
	LastUpdated         time.Time     `json:"last_updated"`
	LastUpdater         int           `json:"last_updater"`
	LastUpdaterUsername string        `json:"last_updater_username"`
	Name                string        `json:"name"`
	Repository          int           `json:"repository"`
	TagLastPulled       time.Time     `json:"tag_last_pulled"`
	TagLastPushed       time.Time     `json:"tag_last_pushed"`
	TagStatus           string        `json:"tag_status"`
	V2                  bool          `json:"v2"`
}

func GetExistingTags

func GetExistingTags(repository string) []DockerTag

type DockerTagsResponse

type DockerTagsResponse struct {
	Count    int         `json:"count"`
	Next     string      `json:"next"`
	Previous string      `json:"previous"`
	Results  []DockerTag `json:"results"`
}

type Download

type Download struct {
	Name   string `json:"name"`
	Sha256 string `json:"sha256"`
}

type Event

type Event int
const (
	Rebuild Event = iota
	Cron
)

type ProjectBase

type ProjectBase struct {
	ProjectID   string `json:"project_id"`
	ProjectName string `json:"project_name"`
}

type ProjectResponse

type ProjectResponse struct {
	ProjectBase
	VersionGroups []string `json:"version_groups"`
	Versions      []string `json:"versions"`
}

type Promotion

type Promotion struct {
	DownloadURL string `json:"downloadURL"`
	DockerTags  string `json:"tags"`
}

func BuildPromotions

func BuildPromotions(builds []VersionFamilyBuild, existingTags []string, event Event) []Promotion

type VersionBuild

type VersionBuild struct {
	Build     int                 `json:"build"`
	Time      time.Time           `json:"time"`
	Channel   string              `json:"channel"`
	Promoted  bool                `json:"promoted"`
	Changes   []Change            `json:"change"`
	Downloads map[string]Download `json:"downloads"`
}

type VersionFamilyBuild

type VersionFamilyBuild struct {
	VersionBuild
	Version string `json:"version"`
}

type VersionFamilyBuildsResponse

type VersionFamilyBuildsResponse struct {
	VersionFamilyResponse
	Builds []VersionFamilyBuild `json:"builds"`
}

type VersionFamilyResponse

type VersionFamilyResponse struct {
	ProjectBase
	VersionGroup string   `json:"version_group"`
	Versions     []string `json:"versions"`
}

Jump to

Keyboard shortcuts

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