registry

package
v0.18.3 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SCHEMAS_ROUTE     = "/s/"
	CACHE_PURGE_ROUTE = "/c/purge"
	SCHEMA_PARAM      = "schema"
)

Variables

This section is empty.

Functions

func GetSchemaHandler added in v0.12.1

func GetSchemaHandler(r *Registry) gin.HandlerFunc

func InitializeSchemaCacheBackend

func InitializeSchemaCacheBackend(conf config.Backend, b SchemaCacheBackend) error

func PurgeCacheHandler added in v0.12.1

func PurgeCacheHandler(r *Registry) gin.HandlerFunc

Types

type Registry

type Registry struct {
	Cache    *freecache.Cache
	Backend  SchemaCacheBackend
	Compiler *jsonschema.Compiler
	// contains filtered or unexported fields
}

func (*Registry) Get

func (r *Registry) Get(key string) (exists bool, data []byte)

func (*Registry) Initialize

func (r *Registry) Initialize(conf config.Registry) error

type SchemaCacheBackend

type SchemaCacheBackend interface {
	Initialize(config config.Backend) error
	GetRemote(schema string) (contents []byte, err error)
	Close()
}

func BuildSchemaCacheBackend

func BuildSchemaCacheBackend(conf config.Backend) (backend SchemaCacheBackend, err error)

Jump to

Keyboard shortcuts

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