registry

package
v0.12.2 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2022 License: AGPL-3.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GCS   string = "gcs"
	S3    string = "s3"
	MINIO string = "minio"
	FS    string = "fs"
	HTTP  string = "http"
	HTTPS string = "https"
	IGLU  string = "iglu"
	KSR   string = "ksr" // Kafka schema registry
)
View Source
const (
	SCHEMAS_ROUTE = "/s/"
	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 ClickhouseRegistryTable

type ClickhouseRegistryTable struct {
	db.BasePKeylessModel
	Name     string `json:"name" gorm:"index:idx_name"`
	Contents string `json:"contents"`
}

type ClickhouseSchemaCacheBackend

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

func (*ClickhouseSchemaCacheBackend) Close

func (b *ClickhouseSchemaCacheBackend) Close()

func (*ClickhouseSchemaCacheBackend) GetRemote

func (b *ClickhouseSchemaCacheBackend) GetRemote(schema string) (contents []byte, err error)

func (*ClickhouseSchemaCacheBackend) Initialize

func (b *ClickhouseSchemaCacheBackend) Initialize(conf config.Backend) error

type FilesystemCacheBackend

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

func (*FilesystemCacheBackend) Close

func (b *FilesystemCacheBackend) Close()

func (*FilesystemCacheBackend) GetRemote

func (b *FilesystemCacheBackend) GetRemote(schema string) (contents []byte, err error)

func (*FilesystemCacheBackend) Initialize

func (b *FilesystemCacheBackend) Initialize(conf config.Backend) error

type GcsSchemaCacheBackend

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

func (*GcsSchemaCacheBackend) Close

func (b *GcsSchemaCacheBackend) Close()

func (*GcsSchemaCacheBackend) GetRemote

func (b *GcsSchemaCacheBackend) GetRemote(schema string) (contents []byte, err error)

func (*GcsSchemaCacheBackend) Initialize

func (b *GcsSchemaCacheBackend) Initialize(config config.Backend) error

type HttpSchemaCacheBackend

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

func (*HttpSchemaCacheBackend) Close

func (b *HttpSchemaCacheBackend) Close()

func (*HttpSchemaCacheBackend) GetRemote

func (b *HttpSchemaCacheBackend) GetRemote(schema string) (contents []byte, err error)

func (*HttpSchemaCacheBackend) Initialize

func (b *HttpSchemaCacheBackend) Initialize(conf config.Backend) error

type MaterializeSchemaCacheBackend

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

func (*MaterializeSchemaCacheBackend) Close

func (b *MaterializeSchemaCacheBackend) Close()

func (*MaterializeSchemaCacheBackend) GetRemote

func (b *MaterializeSchemaCacheBackend) GetRemote(schema string) (contents []byte, err error)

func (*MaterializeSchemaCacheBackend) Initialize

func (b *MaterializeSchemaCacheBackend) Initialize(conf config.Backend) error

type MinioSchemaCacheBackend

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

func (*MinioSchemaCacheBackend) Close

func (b *MinioSchemaCacheBackend) Close()

func (*MinioSchemaCacheBackend) GetRemote

func (b *MinioSchemaCacheBackend) GetRemote(schema string) (contents []byte, err error)

func (*MinioSchemaCacheBackend) Initialize

func (b *MinioSchemaCacheBackend) Initialize(conf config.Backend) error

type MongoSchemaDocument

type MongoSchemaDocument struct {
	ID       primitive.ObjectID `bson:"_id"`
	Name     string             `bson:"name"`
	Contents string             `bson:"contents"`
}

type MongodbSchemaCacheBackend

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

func (*MongodbSchemaCacheBackend) Close

func (b *MongodbSchemaCacheBackend) Close()

func (*MongodbSchemaCacheBackend) GetRemote

func (b *MongodbSchemaCacheBackend) GetRemote(schema string) (contents []byte, err error)

func (*MongodbSchemaCacheBackend) Initialize

func (b *MongodbSchemaCacheBackend) Initialize(conf config.Backend) error

type MysqlSchemaCacheBackend

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

func (*MysqlSchemaCacheBackend) Close

func (b *MysqlSchemaCacheBackend) Close()

func (*MysqlSchemaCacheBackend) GetRemote

func (b *MysqlSchemaCacheBackend) GetRemote(schema string) (contents []byte, err error)

func (*MysqlSchemaCacheBackend) Initialize

func (b *MysqlSchemaCacheBackend) Initialize(conf config.Backend) error

type PostgresSchemaCacheBackend

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

func (*PostgresSchemaCacheBackend) Close

func (b *PostgresSchemaCacheBackend) Close()

func (*PostgresSchemaCacheBackend) GetRemote

func (b *PostgresSchemaCacheBackend) GetRemote(schema string) (contents []byte, err error)

func (*PostgresSchemaCacheBackend) Initialize

func (b *PostgresSchemaCacheBackend) Initialize(conf config.Backend) error

type Registry

type Registry struct {
	Cache   *freecache.Cache
	Backend SchemaCacheBackend
	// 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 RegistryTable

type RegistryTable struct {
	db.BasePKeylessModel
	Name     string         `json:"name" gorm:"index:idx_name"`
	Contents datatypes.JSON `json:"contents"`
}

type S3SchemaCacheBackend

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

func (*S3SchemaCacheBackend) Close

func (b *S3SchemaCacheBackend) Close()

func (*S3SchemaCacheBackend) GetRemote

func (b *S3SchemaCacheBackend) GetRemote(schema string) (contents []byte, err error)

func (*S3SchemaCacheBackend) Initialize

func (b *S3SchemaCacheBackend) Initialize(conf config.Backend) 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