apiserver

package
v0.0.0-...-19239a5 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2021 License: EUPL-1.2 Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BearerToken         = "BearerToken"
	ServiceAccountToken = "ServiceAccountToken"
)

Variables

View Source
var AuthInvalidTypeError = AuthError("type.invalid")
View Source
var UnauthorizedError = AuthError("unauthorized")

Functions

func ApiKeyClaimError

func ApiKeyClaimError(key, msg string) *handlerutil.HttpError

func ApiKeyError

func ApiKeyError(msg string) *handlerutil.HttpError

func ApiKeyExpError

func ApiKeyExpError(msg string) *handlerutil.HttpError

func ApiKeyJtiError

func ApiKeyJtiError(msg string) *handlerutil.HttpError

func ApiKeySignError

func ApiKeySignError(msg string) *handlerutil.HttpError

func AuthError

func AuthError(msg string) *handlerutil.HttpError

func DraftError

func DraftError(msg string) *handlerutil.HttpError

func InvoiceError

func InvoiceError(msg string) *handlerutil.HttpError

func NewPublicInvoicesOptions

func NewPublicInvoicesOptions(params url.Values, maxLimit int) (*db.PublicInvoicesOptions, error)

func NewUserInvoicesOptions

func NewUserInvoicesOptions(userId int, params url.Values, maxLimit int) (*db.UserInvoicesOptions, error)

func SubstituteError

func SubstituteError(msg string) *handlerutil.HttpError

func UpvsError

func UpvsError(msg string) *handlerutil.HttpError

func UserError

func UserError(msg string) *handlerutil.HttpError

Types

type App

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

func NewApp

func NewApp() *App

func (*App) CloseResources

func (a *App) CloseResources()

func (*App) Run

func (a *App) Run()

func (*App) ServeHTTP

func (a *App) ServeHTTP(res http.ResponseWriter, req *http.Request)

type MissingToken

type MissingToken struct{}

func (MissingToken) Error

func (e MissingToken) Error() string

type PagedInvoices

type PagedInvoices struct {
	Invoices []entity.Invoice `json:"invoices"`
	NextId   *string          `json:"nextId"`
}

func NewPagedInvoices

func NewPagedInvoices(invoices []entity.Invoice, limit int) *PagedInvoices

type PatchDraftRequest

type PatchDraftRequest struct {
	Name *string         `json:"name"`
	Data json.RawMessage `json:"data,omitempty"`
}

type PatchUserRequest

type PatchUserRequest struct {
	ServiceAccountPublicKey *string `json:"serviceAccountPublicKey"`
}

func (*PatchUserRequest) Validate

func (u *PatchUserRequest) Validate() error

type Token

type Token struct {
	Value string
	Type  string
}

func GetAuthToken

func GetAuthToken(req *http.Request) (*Token, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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