model

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// NoneKetchup is an undefined ketchup
	NoneKetchup = Ketchup{}
)
View Source
var (
	// NoneRepository is an undefined repository
	NoneRepository = Repository{}
)
View Source
var (
	// NoneUser is an undefined user
	NoneUser = User{}
)
View Source
var (
	// RepositoryKindValues string values
	RepositoryKindValues = []string{"github", "helm"}
)

Functions

func StoreUser added in v1.1.0

func StoreUser(ctx context.Context, user User) context.Context

StoreUser stores given User in context

Types

type Ketchup added in v1.1.0

type Ketchup struct {
	User       User
	Semver     string
	Version    string
	Repository Repository
}

Ketchup of app

type KetchupByPriority added in v1.2.0

type KetchupByPriority []Ketchup

KetchupByPriority sort ketchup by priority (outdated first, name then)

func (KetchupByPriority) Len added in v1.2.0

func (a KetchupByPriority) Len() int

func (KetchupByPriority) Less added in v1.2.0

func (a KetchupByPriority) Less(i, j int) bool

func (KetchupByPriority) Swap added in v1.2.0

func (a KetchupByPriority) Swap(i, j int)

type KetchupByRepositoryID added in v1.1.0

type KetchupByRepositoryID []Ketchup

KetchupByRepositoryID sort ketchup by repository ID

func (KetchupByRepositoryID) Len added in v1.1.0

func (a KetchupByRepositoryID) Len() int

func (KetchupByRepositoryID) Less added in v1.1.0

func (a KetchupByRepositoryID) Less(i, j int) bool

func (KetchupByRepositoryID) Swap added in v1.1.0

func (a KetchupByRepositoryID) Swap(i, j int)

type Release added in v1.1.0

type Release struct {
	Repository Repository     `json:"repository"`
	Version    semver.Version `json:"version"`
}

Release is when new version is out

func NewRelease added in v1.1.0

func NewRelease(repository Repository, version semver.Version) Release

NewRelease creates a new version from its objects

type ReleaseByRepositoryID added in v1.1.0

type ReleaseByRepositoryID []Release

ReleaseByRepositoryID sort release by repository ID

func (ReleaseByRepositoryID) Len added in v1.1.0

func (a ReleaseByRepositoryID) Len() int

func (ReleaseByRepositoryID) Less added in v1.1.0

func (a ReleaseByRepositoryID) Less(i, j int) bool

func (ReleaseByRepositoryID) Swap added in v1.1.0

func (a ReleaseByRepositoryID) Swap(i, j int)

type Repository added in v1.1.0

type Repository struct {
	Name    string         `json:"name"`
	Version string         `json:"version"`
	ID      uint64         `json:"id"`
	Kind    RepositoryKind `json:"kind"`
}

Repository of app

func (Repository) CompareURL added in v1.8.0

func (r Repository) CompareURL(version string) string

CompareURL format the URL of given repository compared against given version

func (Repository) URL added in v1.8.0

func (r Repository) URL() string

URL format the URL of given repository with current version

type RepositoryKind added in v1.8.0

type RepositoryKind int

RepositoryKind defines constant for repository types

const (
	// Github repository kind
	Github RepositoryKind = iota
	// Helm repository kind
	Helm
)

func ParseRepositoryKind added in v1.8.0

func ParseRepositoryKind(value string) (RepositoryKind, error)

ParseRepositoryKind parse raw string into a RepositoryKind

func (RepositoryKind) String added in v1.8.0

func (r RepositoryKind) String() string

type User added in v1.1.0

type User struct {
	Email string
	Login authModel.User
	ID    uint64
}

User of app

func ReadUser added in v1.1.0

func ReadUser(ctx context.Context) User

ReadUser retrieves user from context

Jump to

Keyboard shortcuts

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