model

package
v0.0.0-...-ffb091d Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2018 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddNamespace

func AddNamespace(p *types.Project, username string) error

func AddRelease

func AddRelease(namespace, metadataJson string) (*core.ReleaseMetadata, error)

func AddReleaseByUser

func AddReleaseByUser(namespace, metadataJson, uploadUser string) (*core.ReleaseMetadata, error)

func CallWebHook

func CallWebHook(namespace, unit, version, releaseId, username, url string)

func Diff

func Diff(namespace, name, version, diffWith string) (map[string]map[string]core.Changes, error)

func GetApplicationHooks

func GetApplicationHooks(namespace, name string) (types.Hooks, error)

func GetApplicationVersions

func GetApplicationVersions(namespace, name string) ([]string, error)

func GetApplications

func GetApplications(namespace string) (map[string]*types.Application, error)

func GetDownloadReadSeeker

func GetDownloadReadSeeker(namespace, application, versionQuery string) (io.Reader, error)

func GetDownstreamDependencies

func GetDownstreamDependencies(namespace, name, version string) ([]*types.Dependency, error)

func GetDownstreamDependenciesFilteredBy

func GetDownstreamDependenciesFilteredBy(namespace, name, version string, f *types.DownstreamDependenciesFilter) ([]*types.Dependency, error)

func GetNamespaceHooks

func GetNamespaceHooks(namespace string) (types.Hooks, error)

func GetNextVersion

func GetNextVersion(namespace, app, prefix string) (string, error)

func GetPreviousReleaseMetadata

func GetPreviousReleaseMetadata(namespace, name, version string) (*core.ReleaseMetadata, error)

func GetPreviousVersion

func GetPreviousVersion(namespace, app, version string) (string, error)

func GetReleaseMetadata

func GetReleaseMetadata(namespace, name, version string) (*core.ReleaseMetadata, error)

func IsUserError

func IsUserError(err error) bool

func NewUserError

func NewUserError(err error) error

func ProcessDependencies

func ProcessDependencies(release *Release) error

func ProcessUnprocessedReleases

func ProcessUnprocessedReleases() error

func ResolveReleaseId

func ResolveReleaseId(namespace, application, versionQuery string) (*Release, error)

func TagRelease

func TagRelease(namespace, application, releaseId, tag string) error

func UpdateApplicationHooks

func UpdateApplicationHooks(namespace, name string, hooks types.Hooks) error

func UpdateNamespace

func UpdateNamespace(p *types.Project) error

func UpdateNamespaceHooks

func UpdateNamespaceHooks(namespace string, hooks types.Hooks) error

func UploadPackage

func UploadPackage(namespace, releaseId string, pkg io.ReadSeeker) error

Types

type ApplicationPayload

type ApplicationPayload struct {
	*types.Application
	Versions []string `json:"versions",omitempty`
}

func GetApplication

func GetApplication(namespace, name string) (*ApplicationPayload, error)

type DependencyGraph

type DependencyGraph struct {
	Nodes []*DependencyGraphNode `json:"nodes"`
	Edges []*DependencyGraphEdge `json:"edges"`
}

func GetDependencyGraph

func GetDependencyGraph(namespace, name, version string, downstreamFunc DownstreamDependenciesResolver) (*DependencyGraph, error)

func (*DependencyGraph) AddEdge

func (d *DependencyGraph) AddEdge(from, to, typ string)

func (*DependencyGraph) AddNode

func (d *DependencyGraph) AddNode(id, typ string)

type DependencyGraphEdge

type DependencyGraphEdge struct {
	From string `json:"from"`
	To   string `json:"to"`
	Type string `json:"type"`
}

type DependencyGraphNode

type DependencyGraphNode struct {
	Id    string `json:"id"`
	Label string `json:"label"`
	Type  string `json:"type"`
}

type DownstreamDependenciesResolver

type DownstreamDependenciesResolver func(*types.Release) ([]*types.Dependency, error)

type NamespacePayload

type NamespacePayload struct {
	*types.Project
	Units map[string]*types.Application `json:"units"`
}

func GetNamespace

func GetNamespace(namespace string) (*NamespacePayload, error)

type ReleasePayload

type ReleasePayload struct {
	Release    *core.ReleaseMetadata `json:"release"`
	Versions   []string              `json:"versions"`
	IsLatest   bool                  `json:"is_latest"`
	Downloads  int                   `json:"downloads"`
	UploadedBy string                `json:"uploaded_by"`
	UploadedAt time.Time             `json:"uploaded_at"`
}

func GetRelease

func GetRelease(namespace, name, version string) (*ReleasePayload, error)

type UserError

type UserError struct {
	Msg string
}

func (UserError) Error

func (u UserError) Error() string

Jump to

Keyboard shortcuts

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