Documentation ¶
Index ¶
- func HandleHook(repos core.RepositoryStore, builds core.BuildStore, triggerer core.Triggerer, ...) http.HandlerFunc
- func HandleIndex(host string, session core.Session, license core.LicenseService) http.HandlerFunc
- func HandleLogin(users core.UserStore, userz core.UserService, syncer core.Syncer, ...) http.HandlerFunc
- func HandleLoginForm() http.HandlerFunc
- func HandleLogout() http.HandlerFunc
- func HandleVarz(client *scm.Client, license *core.License) http.HandlerFunc
- func HandleVersion(w http.ResponseWriter, r *http.Request)
- type Error
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleHook ¶
func HandleHook( repos core.RepositoryStore, builds core.BuildStore, triggerer core.Triggerer, parser core.HookParser, ) http.HandlerFunc
HandleHook returns an http.HandlerFunc that handles webhooks triggered by source code management.
func HandleIndex ¶
func HandleIndex(host string, session core.Session, license core.LicenseService) http.HandlerFunc
func HandleLogin ¶
func HandleLogin( users core.UserStore, userz core.UserService, syncer core.Syncer, session core.Session, admission core.AdmissionService, sender core.WebhookSender, ) http.HandlerFunc
HandleLogin creates and http.HandlerFunc that handles user authentication and session initialization.
func HandleLoginForm ¶
func HandleLoginForm() http.HandlerFunc
HandleLoginForm creates and http.HandlerFunc that presents the user with an Login form for password-based authentication.
func HandleLogout ¶
func HandleLogout() http.HandlerFunc
HandleLogout creates an http.HandlerFunc that handles session termination.
func HandleVarz ¶
HandleVarz creates an http.HandlerFunc that exposes internal system information.
func HandleVersion ¶
func HandleVersion(w http.ResponseWriter, r *http.Request)
HandleVersion creates an http.HandlerFunc that returns the version number and build details.
Types ¶
type Error ¶
type Error struct {
Message string `json:"message"`
}
Error represents a json-encoded API error.
type Server ¶
type Server struct { Admitter core.AdmissionService Builds core.BuildStore Client *scm.Client Hooks core.HookParser License *core.License Licenses core.LicenseService Linker core.Linker Login login.Middleware Repos core.RepositoryStore Session core.Session Syncer core.Syncer Triggerer core.Triggerer Users core.UserStore Userz core.UserService Webhook core.WebhookSender Options secure.Options Host string }
Server is a http.Handler which exposes drone functionality over HTTP.
func New ¶
func New( admitter core.AdmissionService, builds core.BuildStore, client *scm.Client, hooks core.HookParser, license *core.License, licenses core.LicenseService, linker core.Linker, login login.Middleware, repos core.RepositoryStore, session core.Session, syncer core.Syncer, triggerer core.Triggerer, users core.UserStore, userz core.UserService, webhook core.WebhookSender, options secure.Options, system *core.System, ) Server