repository

package
v1.5.2-upstream Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2017 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//source flags
	GITHUB      = "github"
	GITLAB      = "gitlab"
	DOCKERHUB   = "dockerhub"
	MYDOCKERHUB = "mydockerhub"

	CIHOOK   = "CI"
	TYPE     = "type"
	TOKEN    = "token"
	USERNAME = "username"
	STATUS   = "unbound"

	// IMAGE indicates that the repo is an image
	IMAGE = "image"
	// Git indicates that the repo is a GIT
	GIT = "git"
	// oneclick indicates that an oneclick image exists
	ONECLICK = "oneclick"
)

Variables

This section is empty.

Functions

func ForImageName

func ForImageName(fullTosca string, version string) string

This shall be under type Tosca {} and a global method

func Register

func Register(name string, manager RepositoryManager)

Register registers a new repository manager, that can be later configured and used.

Types

type Hook

type Hook struct {
	Enabled  bool
	Token    string
	UserName string
	CartonId string
	BoxId    string
}

type Repo

type Repo struct {
	Type     string
	Source   string
	OneClick bool
	URL      string
	Hook     *Hook
}

Repository represents a repository managed by the manager.

func (Repo) GetShortName

func (r Repo) GetShortName() (string, error)

func (Repo) GetSource

func (r Repo) GetSource() string

func (Repo) GetToken

func (r Repo) GetToken() string

func (Repo) GetType

func (r Repo) GetType() string

func (Repo) GetUserName

func (r Repo) GetUserName() string

func (Repo) Gitr

func (r Repo) Gitr() string

func (Repo) IsEnabled

func (r Repo) IsEnabled() bool

func (Repo) Trigger

func (r Repo) Trigger() string

Check on CartonId, BoxId if it exists (r.Hook.BoxId)

type Repository

type Repository interface {
	IsEnabled() bool
	GetSource() string
	GetType() string
	GetToken() string
	GetUserName() string
	Gitr() string
	Trigger() string
	GetShortName() (string, error)
}

type RepositoryManager

type RepositoryManager interface {
	CreateHook(r Repository) (string, error)
	RemoveHook(r Repository) error
}

RepositoryManager represents a manager of application repositories.

func Manager

func Manager(managerName string) RepositoryManager

Manager returns the current configured manager, as defined in the configuration file.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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