api

package
v1.4.4-beta Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: AGPL-3.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	BannedTokens map[string]struct{}
	// contains filtered or unexported fields
}

func New

func New(o APIOpts) *API

func (*API) Start

func (a *API) Start() error

func (*API) Stop

func (a *API) Stop(ctx context.Context) error

type APIOpts

type APIOpts struct {
	Debug         bool
	EnableMetrics bool
	EnableDocs    bool
	ListenAddress string
	Build         string
	VerifyingKey  crypto.PublicKey
	SigningKey    crypto.PrivateKey
	Store         store.Store
	Logg          *slog.Logger
	ChainProvider *ethutils.Provider
	Worker        *worker.WorkerContainer
	BannedTokens  []string
}

type JWTCustomClaims

type JWTCustomClaims struct {
	PublicKey string `json:"publicKey"`
	Service   bool   `json:"service"`
	jwt.RegisteredClaims
}

type Pagination

type Pagination struct {
	api.OTXByAccountRequest

	FirstPage bool
}

type Validator

type Validator struct {
	ValidatorProvider *validator.Validate
}

func (*Validator) Validate

func (v *Validator) Validate(i interface{}) error

In production we don't expose detailed validation error messages.

Jump to

Keyboard shortcuts

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