service

package
v0.0.0-...-6bb069b Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2022 License: GPL-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BUILDING = 0
	SUCCESS  = 1
	FAIL     = 2
)

Functions

This section is empty.

Types

type BuildHistoryService

type BuildHistoryService struct {
	// contains filtered or unexported fields
}

* build历史记录servie

func GetBuildHistoryServiceInstance

func GetBuildHistoryServiceInstance() *BuildHistoryService

func (*BuildHistoryService) InsertRecord

func (s *BuildHistoryService) InsertRecord(operator string, project string) int64

func (*BuildHistoryService) QueryLastBuildRecord

func (s *BuildHistoryService) QueryLastBuildRecord(project string) *model.BuildHistory

func (*BuildHistoryService) QueryRecord

func (s *BuildHistoryService) QueryRecord(id int) *model.BuildHistory

func (*BuildHistoryService) QueryRecordList

func (s *BuildHistoryService) QueryRecordList(cursor int, offset int, project string) []*model.BuildHistory

func (*BuildHistoryService) UpdateRecord

func (s *BuildHistoryService) UpdateRecord(id int64, logs string, state int)

type DockerFileOperator

type DockerFileOperator struct {
}

* 组装Dockerfile

func GetDockerFileOperatorInstance

func GetDockerFileOperatorInstance() *DockerFileOperator

single instance

func (*DockerFileOperator) Add

func (dfo *DockerFileOperator) Add(currentDockerfile string, dstPath string, srcPaths ...string) (string, error)

func (*DockerFileOperator) Arg

func (dfo *DockerFileOperator) Arg(currentDockerfile string, args ...string) (string, error)

func (*DockerFileOperator) CmdExec

func (dfo *DockerFileOperator) CmdExec(currentDockerfile string, command string, params ...string) (string, error)

func (*DockerFileOperator) CmdShell

func (dfo *DockerFileOperator) CmdShell(currentDockerfile string, command string, params ...string) (string, error)

func (*DockerFileOperator) Copy

func (dfo *DockerFileOperator) Copy(currentDockerfile string, dstPath string, srcPaths ...string) (string, error)

func (*DockerFileOperator) DockerfileContent

func (dfo *DockerFileOperator) DockerfileContent(currentDockerfile, dockerfileContent string) (string, error)

func (*DockerFileOperator) EntrypointExec

func (dfo *DockerFileOperator) EntrypointExec(currentDockerfile string, command string, params ...string) (string, error)

func (*DockerFileOperator) EntrypointShell

func (dfo *DockerFileOperator) EntrypointShell(currentDockerfile string, command string, params ...string) (string, error)

func (*DockerFileOperator) Env

func (dfo *DockerFileOperator) Env(currentDockerfile string, envs ...string) (string, error)

func (*DockerFileOperator) Expose

func (dfo *DockerFileOperator) Expose(currentDockerfile string, ports ...string) (string, error)

func (*DockerFileOperator) From

func (dfo *DockerFileOperator) From(currentDockerfile string, baseImage string) (string, error)

func (*DockerFileOperator) Label

func (dfo *DockerFileOperator) Label(currentDockerfile string, labels ...string) (string, error)

func (*DockerFileOperator) Maintainer

func (dfo *DockerFileOperator) Maintainer(currentDockerfile string, author string) (string, error)

func (*DockerFileOperator) Onbuild

func (dfo *DockerFileOperator) Onbuild(currentDockerfile string, instruction string) (string, error)

func (*DockerFileOperator) RunExec

func (dfo *DockerFileOperator) RunExec(currentDockerfile string, params string) (string, error)

func (*DockerFileOperator) RunShell

func (dfo *DockerFileOperator) RunShell(currentDockerfile string, command string) (string, error)

func (*DockerFileOperator) Stopsignal

func (dfo *DockerFileOperator) Stopsignal(currentDockerfile string, signal string) (string, error)

func (*DockerFileOperator) User

func (dfo *DockerFileOperator) User(currentDockerfile string, user string) (string, error)

func (*DockerFileOperator) Volume

func (dfo *DockerFileOperator) Volume(currentDockerfile string, volumes ...string) (string, error)

func (*DockerFileOperator) WorkDir

func (dfo *DockerFileOperator) WorkDir(currentDockerfile string, workDir string) (string, error)

func (*DockerFileOperator) Workdir

func (dfo *DockerFileOperator) Workdir(currentDockerfile string, workdirs ...string) (string, error)

type DockerOperator

type DockerOperator struct {
}

* docker build push

func GetDockerOperatorInstance

func GetDockerOperatorInstance() *DockerOperator

single instance

func (*DockerOperator) BuildImage

func (do *DockerOperator) BuildImage(dockerFilePath string, tag string) (string, *stackError.Error)

func (*DockerOperator) CheckImageExist

func (do *DockerOperator) CheckImageExist(tag string, startTime time.Time) bool

func (*DockerOperator) DeleteImage

func (do *DockerOperator) DeleteImage(tag string) bool

delete image

func (*DockerOperator) GenerateRandomTag

func (do *DockerOperator) GenerateRandomTag() (*stackError.Error, string)

func (*DockerOperator) LoginHarbor

func (do *DockerOperator) LoginHarbor() *stackError.Error

login harbor

func (*DockerOperator) PushImage

func (do *DockerOperator) PushImage(dockerfilePath, tag string) (string, *stackError.Error)

push image

type HttpService

type HttpService struct {
}

* http 服务

func GetHttpServiceInstance

func GetHttpServiceInstance() *HttpService

func (*HttpService) Get

func (service *HttpService) Get(url string) ([]byte, *stackError.Error)

Jump to

Keyboard shortcuts

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