store

package
v0.0.0-...-ddc8f8a Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2017 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildCreate

func BuildCreate(c echo.Context, build *model.Build, procs ...*model.Proc) error

func BuildFind

func BuildFind(c echo.Context, repo *model.Repo) ([]*model.Build, error)

func BuildLoad

func BuildLoad(c echo.Context, id int64) (*model.Build, error)

func BuildUpdate

func BuildUpdate(c echo.Context, build *model.Build) error

func ConfigCreate

func ConfigCreate(c echo.Context, conf *model.Config) error

func ConfigFind

func ConfigFind(c echo.Context, repo *model.Repo) (*model.Config, error)

func GetBuildNumber

func GetBuildNumber(c echo.Context, repo *model.Repo, num int) (*model.Build, error)

func GetRepoScmIDOwnerName

func GetRepoScmIDOwnerName(c echo.Context, scmID int64, owner, name string) (*model.Repo, error)

func LogFind

func LogFind(c echo.Context, proc *model.Proc) (io.ReadCloser, error)

func ProcChild

func ProcChild(c echo.Context, build *model.Build, pid int, child string) (*model.Proc, error)

func ProcClear

func ProcClear(c echo.Context, build *model.Build) error

func ProcCreate

func ProcCreate(c echo.Context, procs []*model.Proc) error

func ProcList

func ProcList(c echo.Context, build *model.Build) ([]*model.Proc, error)

func ProcLoad

func ProcLoad(c echo.Context, id int64) (*model.Proc, error)

func ProcUpdate

func ProcUpdate(c echo.Context, proc *model.Proc) error

func RegistryCreate

func RegistryCreate(c echo.Context, registry *model.Registry) error

func RegistryUpdate

func RegistryUpdate(c echo.Context, registry *model.Registry) error

func RepoCreate

func RepoCreate(c echo.Context, repo *model.Repo) error

func RepoFind

func RepoFind(c echo.Context, scm *model.ScmAccount) ([]*model.Repo, error)

func RepoList

func RepoList(c echo.Context) ([]*model.Repo, error)

func RepoLoad

func RepoLoad(c echo.Context, id int64) (*model.Repo, error)

func ScmAccountCreate

func ScmAccountCreate(c echo.Context, account *model.ScmAccount) error

func ScmAccountList

func ScmAccountList(c echo.Context) ([]*model.ScmAccount, error)

func ScmAccountLoad

func ScmAccountLoad(c echo.Context, id int64) (*model.ScmAccount, error)

func SecretCreate

func SecretCreate(c echo.Context, secret *model.Secret) error

func SecretUpdate

func SecretUpdate(c echo.Context, secret *model.Secret) error

func SetupRemoteWithScmID

func SetupRemoteWithScmID(c echo.Context, id int64) (*model.ScmAccount, error)

helper: 合并 ScmAccountLoad 和 SetupRemote 的功能

func ToContext

func ToContext(c Setter, store Store)

ToContext adds the Store to this context if it supports the Setter interface.

Types

type Setter

type Setter interface {
	Set(string, interface{})
}

Setter defines a context that enables setting values.

type Store

type Store interface {
	ScmAccountCreate(*model.ScmAccount) error
	ScmAccountList() ([]*model.ScmAccount, error)
	ScmAccountLoad(int64) (*model.ScmAccount, error)

	ConfigCreate(*model.Config) error
	ConfigLoad(int64) (*model.Config, error)
	ConfigFind(*model.Repo) (*model.Config, error)

	RepoCreate(*model.Repo) error
	RepoLoad(int64) (*model.Repo, error)
	// GetRepoName gets a repo by its full name.
	RepoList() ([]*model.Repo, error)
	RepoFind(*model.ScmAccount) ([]*model.Repo, error)
	GetRepoScmName(int64, string) (*model.Repo, error)

	SecretCreate(*model.Secret) error
	SecretUpdate(*model.Secret) error

	BuildCreate(*model.Build, ...*model.Proc) error
	BuildFind(*model.Repo) ([]*model.Build, error)
	BuildLoad(int64) (*model.Build, error)
	BuildUpdate(*model.Build) error
	GetBuildNumber(*model.Repo, int) (*model.Build, error)

	ProcCreate([]*model.Proc) error
	ProcList(*model.Build) ([]*model.Proc, error)
	ProcLoad(int64) (*model.Proc, error)
	ProcChild(*model.Build, int, string) (*model.Proc, error)
	ProcUpdate(*model.Proc) error
	ProcClear(*model.Build) error

	TaskList() ([]*model.Task, error)
	TaskInsert(*model.Task) error
	TaskDelete(string) error

	LogFind(*model.Proc) (io.ReadCloser, error)
	LogSave(*model.Proc, io.Reader) error

	RegistryCreate(*model.Registry) error
	RegistryUpdate(*model.Registry) error
}

func FromContext

func FromContext(c echo.Context) Store

FromContext returns the Store associated with this context.

Directories

Path Synopsis
ddl
sql

Jump to

Keyboard shortcuts

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