api

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2019 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Router

func Router() *chi.Mux

Router returns *chi.Mux config

func Serve

func Serve(startconfig Config) error

Serve the API webserver and register all handlers

Types

type Config

type Config struct {
	Addr       string
	TLSDisable bool
	TLSCert    string
	TLSKey     string

	Auth   authenticator.Authenticator
	Princs principals.Principals
	Signer signer.Signer
}

Config represents the config of the API webserver.

type Login

type Login struct {
	User     string `json:"user" binding:"required"`
	Password string `json:"password" binding:"required"`
	PubKey   string `json:"public_key" binding:"required"`
}

Login represents credentials expected by SMK server

func (*Login) Validate

func (l *Login) Validate() error

Validate fields of login struct

Jump to

Keyboard shortcuts

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