server

package
v0.8.10 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2018 License: Apache-2.0 Imports: 40 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Config = struct {
	Services struct {
		Pubsub     pubsub.Publisher
		Queue      queue.Queue
		Logs       logging.Log
		Senders    model.SenderService
		Secrets    model.SecretService
		Registries model.RegistryService
		Environ    model.EnvironService
		Limiter    model.Limiter
	}
	Storage struct {
		// Users  model.UserStore
		// Repos  model.RepoStore
		// Builds model.BuildStore
		// Logs   model.LogStore
		Config model.ConfigStore
		Files  model.FileStore
		Procs  model.ProcStore
	}
	Server struct {
		Key            string
		Cert           string
		Host           string
		Port           string
		Pass           string
		RepoConfig     string
		SessionExpires time.Duration
	}
	Prometheus struct {
		AuthToken string
	}
	Pipeline struct {
		Limits     model.ResourceLimit
		Volumes    []string
		Networks   []string
		Privileged []string
	}
}{}

Config is an evil global configuration that will be used as we transition / refactor the codebase to move away from storing these values in the Context.

Functions

func ChownRepo added in v0.5.0

func ChownRepo(c *gin.Context)

func DeleteBuild added in v0.5.0

func DeleteBuild(c *gin.Context)

func DeleteBuildLogs added in v0.8.4

func DeleteBuildLogs(c *gin.Context)

func DeleteRegistry added in v0.6.0

func DeleteRegistry(c *gin.Context)

DeleteRegistry deletes the named registry from the database.

func DeleteRepo added in v0.5.0

func DeleteRepo(c *gin.Context)

func DeleteSecret added in v0.5.0

func DeleteSecret(c *gin.Context)

DeleteSecret deletes the named secret from the database.

func DeleteToken added in v0.5.0

func DeleteToken(c *gin.Context)

func DeleteUser added in v0.5.0

func DeleteUser(c *gin.Context)

func EventStreamSSE added in v0.8.0

func EventStreamSSE(c *gin.Context)

func FileGet added in v0.8.0

func FileGet(c *gin.Context)

FileGet gets a file by process and name

func FileList added in v0.8.0

func FileList(c *gin.Context)

FileList gets a list file by build.

func GetBadge added in v0.5.0

func GetBadge(c *gin.Context)

func GetBuild added in v0.5.0

func GetBuild(c *gin.Context)

func GetBuildLast added in v0.5.0

func GetBuildLast(c *gin.Context)

func GetBuildLogs added in v0.5.0

func GetBuildLogs(c *gin.Context)

func GetBuildQueue added in v0.5.0

func GetBuildQueue(c *gin.Context)

func GetBuilds added in v0.5.0

func GetBuilds(c *gin.Context)

func GetCC added in v0.5.0

func GetCC(c *gin.Context)

func GetFeed added in v0.5.0

func GetFeed(c *gin.Context)

func GetLoginToken added in v0.5.0

func GetLoginToken(c *gin.Context)

func GetLogout added in v0.5.0

func GetLogout(c *gin.Context)

func GetProcLogs added in v0.8.0

func GetProcLogs(c *gin.Context)

func GetQueueInfo added in v0.6.0

func GetQueueInfo(c *gin.Context)

func GetRegistry added in v0.6.0

func GetRegistry(c *gin.Context)

GetRegistry gets the name registry from the database and writes to the response in json format.

func GetRegistryList added in v0.6.0

func GetRegistryList(c *gin.Context)

GetRegistryList gets the registry list from the database and writes to the response in json format.

func GetRepo added in v0.5.0

func GetRepo(c *gin.Context)

func GetRepos added in v0.5.0

func GetRepos(c *gin.Context)

func GetSecret added in v0.6.0

func GetSecret(c *gin.Context)

GetSecret gets the named secret from the database and writes to the response in json format.

func GetSecretList added in v0.6.0

func GetSecretList(c *gin.Context)

GetSecretList gets the secret list from the database and writes to the response in json format.

func GetSelf added in v0.5.0

func GetSelf(c *gin.Context)

func GetUser added in v0.5.0

func GetUser(c *gin.Context)

func GetUsers added in v0.5.0

func GetUsers(c *gin.Context)

func HandleAuth added in v0.8.0

func HandleAuth(c *gin.Context)

func HandleLogin added in v0.8.0

func HandleLogin(c *gin.Context)

func Health added in v0.8.2

func Health(c *gin.Context)

Health endpoint returns a 500 if the server state is unhealthy.

func LogStreamSSE added in v0.8.0

func LogStreamSSE(c *gin.Context)

func MoveRepo added in v0.8.0

func MoveRepo(c *gin.Context)

func PatchRegistry added in v0.6.0

func PatchRegistry(c *gin.Context)

PatchRegistry updates the registry in the database.

func PatchRepo added in v0.5.0

func PatchRepo(c *gin.Context)

func PatchSecret added in v0.6.0

func PatchSecret(c *gin.Context)

PatchSecret updates the secret in the database.

func PatchUser added in v0.5.0

func PatchUser(c *gin.Context)

func PostApproval added in v0.6.0

func PostApproval(c *gin.Context)

func PostBuild added in v0.5.0

func PostBuild(c *gin.Context)

func PostDecline added in v0.6.0

func PostDecline(c *gin.Context)

func PostHook added in v0.5.0

func PostHook(c *gin.Context)

func PostRegistry added in v0.6.0

func PostRegistry(c *gin.Context)

PostRegistry persists the registry to the database.

func PostRepo added in v0.5.0

func PostRepo(c *gin.Context)

func PostSecret added in v0.5.0

func PostSecret(c *gin.Context)

PostSecret persists the secret to the database.

func PostToken added in v0.5.0

func PostToken(c *gin.Context)

func PostUser added in v0.5.0

func PostUser(c *gin.Context)

func RepairRepo added in v0.6.0

func RepairRepo(c *gin.Context)

func ToConfig added in v0.5.0

func ToConfig(c *gin.Context) *model.Settings

ToConfig returns the config from the Context

func Version added in v0.8.2

func Version(c *gin.Context)

Version endpoint returns the server version and build information.

func ZombieKill added in v0.8.0

func ZombieKill(c *gin.Context)

ZombieKill kills zombie processes stuck in an infinite pending or running state. This can only be invoked by administrators and may have negative effects.

Types

type DroneServer added in v0.8.0

type DroneServer struct {
	Remote remote.Remote
	Queue  queue.Queue
	Pubsub pubsub.Publisher
	Logger logging.Log
	Store  store.Store
	Host   string
}

DroneServer is a grpc server implementation.

func (*DroneServer) Done added in v0.8.0

func (*DroneServer) Extend added in v0.8.0

func (*DroneServer) Init added in v0.8.0

func (*DroneServer) Log added in v0.8.0

func (*DroneServer) Next added in v0.8.0

func (*DroneServer) Update added in v0.8.0

func (*DroneServer) Upload added in v0.8.0

func (*DroneServer) Wait added in v0.8.0

type RPC added in v0.6.0

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

func (*RPC) Done added in v0.6.0

func (s *RPC) Done(c context.Context, id string, state rpc.State) error

Done implements the rpc.Done function

func (*RPC) Extend added in v0.6.0

func (s *RPC) Extend(c context.Context, id string) error

Extend implements the rpc.Extend function

func (*RPC) Init added in v0.6.0

func (s *RPC) Init(c context.Context, id string, state rpc.State) error

Init implements the rpc.Init function

func (*RPC) Log added in v0.6.0

func (s *RPC) Log(c context.Context, id string, line *rpc.Line) error

Log implements the rpc.Log function

func (*RPC) Next added in v0.6.0

func (s *RPC) Next(c context.Context, filter rpc.Filter) (*rpc.Pipeline, error)

Next implements the rpc.Next function

func (*RPC) Update added in v0.6.0

func (s *RPC) Update(c context.Context, id string, state rpc.State) error

Update implements the rpc.Update function

func (*RPC) Upload added in v0.6.0

func (s *RPC) Upload(c context.Context, id string, file *rpc.File) error

Upload implements the rpc.Upload function

func (*RPC) Wait added in v0.6.0

func (s *RPC) Wait(c context.Context, id string) error

Wait implements the rpc.Wait function

type Syncer added in v0.8.0

type Syncer interface {
	Sync(user *model.User) error
}

Syncer synces the user repository and permissions.

Directories

Path Synopsis
Package classification Drone API.
Package classification Drone API.

Jump to

Keyboard shortcuts

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