yolosvc

package
v2.110.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2022 License: Apache-2.0, MIT Imports: 63 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BintrayWorkerOpts

type BintrayWorkerOpts struct {
	Logger     *zap.Logger
	LoopAfter  time.Duration
	ClearCache *abool.AtomicBool
	Once       bool
}

type BuildkiteWorkerOpts

type BuildkiteWorkerOpts struct {
	Logger     *zap.Logger
	MaxBuilds  int
	LoopAfter  time.Duration
	ClearCache *abool.AtomicBool
	Once       bool
}

type CircleciWorkerOpts

type CircleciWorkerOpts struct {
	Logger     *zap.Logger
	MaxBuilds  int
	LoopAfter  time.Duration
	ClearCache *abool.AtomicBool
	Once       bool
}

type GithubWorkerOpts

type GithubWorkerOpts struct {
	Logger      *zap.Logger
	MaxBuilds   int
	LoopAfter   time.Duration
	ClearCache  *abool.AtomicBool
	Once        bool
	ReposFilter string
	Token       string
}

type PkgmanWorkerOpts

type PkgmanWorkerOpts struct {
	Logger     *zap.Logger
	LoopAfter  time.Duration
	ClearCache *abool.AtomicBool
	Once       bool
}

type Server

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

func NewServer

func NewServer(ctx context.Context, svc Service, opts ServerOpts) (*Server, error)

func (*Server) Start

func (srv *Server) Start() error

func (*Server) Stop

func (srv *Server) Stop()

type ServerOpts

type ServerOpts struct {
	Logger             *zap.Logger
	HTTPBind           string
	GRPCBind           string
	CORSAllowedOrigins string
	RequestTimeout     time.Duration
	ShutdownTimeout    time.Duration
	BasicAuth          string
	Realm              string
	AuthSalt           string
	DevMode            bool
	ClearCache         *abool.AtomicBool
	WithCache          bool
}

type Service

type Service interface {
	yolopb.YoloServiceServer
	PlistGenerator(w http.ResponseWriter, r *http.Request)
	ArtifactDownloader(w http.ResponseWriter, r *http.Request)
	ArtifactIcon(w http.ResponseWriter, r *http.Request)
	ArtifactGetFile(w http.ResponseWriter, r *http.Request)

	GitHubWorker(ctx context.Context, opts GithubWorkerOpts) error
	BuildkiteWorker(ctx context.Context, opts BuildkiteWorkerOpts) error
	CircleciWorker(ctx context.Context, opts CircleciWorkerOpts) error
	BintrayWorker(ctx context.Context, opts BintrayWorkerOpts) error
	PkgmanWorker(ctx context.Context, opts PkgmanWorkerOpts) error
}

func NewService

func NewService(db *gorm.DB, opts ServiceOpts) (Service, error)

func TestingService added in v2.99.0

func TestingService(t *testing.T, opts ServiceOpts) (Service, func())

type ServiceOpts

type ServiceOpts struct {
	BuildkiteClient    *buildkite.Client
	CircleciClient     *circleci.Client
	BintrayClient      *bintray.Client
	GithubClient       *github.Client
	Logger             *zap.Logger
	AuthSalt           string
	DevMode            bool
	ClearCache         *abool.AtomicBool
	ArtifactsCachePath string
	IOSPrivkeyPath     string
	IOSProvPath        string
	IOSPrivkeyPass     string
}

Jump to

Keyboard shortcuts

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