Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrAuthenticationError is returned if the given authentication details for // an operation were incorrect. This could mean the token itself isn't valid, // or that the token was not authorized for that operation. ErrAuthenticationError = errors.New("could not authenticate") )
Functions ¶
This section is empty.
Types ¶
type AdminHandler ¶
type AdminHandler struct {
// contains filtered or unexported fields
}
An AdminHandler handles requests from administrators. This mostly contains diagnostic and informational commands.
func (*AdminHandler) ListWorkers ¶
func (h *AdminHandler) ListWorkers(token string) ([]database.Worker, error)
type AuthService ¶
type AuthService struct {
// contains filtered or unexported fields
}
func (*AuthService) AuthenticateAdmin ¶
func (as *AuthService) AuthenticateAdmin(token string) bool
AuthenticateAdmin returns true if the given token is a valid token for an administrator.
func (*AuthService) AuthenticateWorker ¶
func (as *AuthService) AuthenticateWorker(token string) bool
AuthenticateWorker returns true if the given token is a valid token for a worker.
type Core ¶
type Core struct { AdminHandler *AdminHandler WorkerHandler *WorkerHandler // contains filtered or unexported fields }
Core is used as a central manager for Junction activity. It is the primary point of interface for API handlers.
func NewCore ¶
func NewCore(conf *CoreConfig) (*Core, error)
type CoreConfig ¶
type WorkerHandler ¶
type WorkerHandler struct {
// contains filtered or unexported fields
}
A WorkerHandler handles requests from workers.
Click to show internal directories.
Click to hide internal directories.