registry

package module
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2021 License: Apache-2.0 Imports: 31 Imported by: 0

README

go-schema-registry-client

Go implementation of ProtoBuf and Avro schema registry client with resolvers and Specific/Generic serialization and deserialization features.

Documentation

Index

Constants

View Source
const LogEntities = 128

Variables

This section is empty.

Functions

This section is empty.

Types

type AvroSchema added in v1.0.2

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

func NewAvroSchema added in v1.1.5

func NewAvroSchema(jsonSchema string) (*AvroSchema, error)

func (*AvroSchema) Render added in v1.0.2

func (s *AvroSchema) Render() (string, error)

func (*AvroSchema) Type added in v1.0.2

func (s *AvroSchema) Type() string

type Client added in v1.0.1

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

func NewClient

func NewClient(baseUrl string) *Client

func NewClientWith added in v1.1.3

func NewClientWith(config *Config) *Client

func (*Client) Deserialize added in v1.0.1

func (c *Client) Deserialize(ctx context.Context, data []byte) (interface{}, error)

func (*Client) DeserializeInto added in v1.1.0

func (c *Client) DeserializeInto(ctx context.Context, data []byte, into interface{}) error

func (*Client) GetSchema added in v1.0.1

func (c *Client) GetSchema(ctx context.Context, schemaId uint32) (Schema, error)

func (*Client) GetSubjectVersion added in v1.0.1

func (c *Client) GetSubjectVersion(ctx context.Context, subject string, version int) (Schema, error)

func (*Client) GetSubjectVersionBySchemaId added in v1.0.1

func (c *Client) GetSubjectVersionBySchemaId(ctx context.Context, subject string, schemaId uint32) (int, error)

func (*Client) RegisterAvroType added in v1.0.2

func (c *Client) RegisterAvroType(ctx context.Context, subject string, schema avro.Schema) (uint32, error)

func (*Client) RegisterProtobufType added in v1.0.2

func (c *Client) RegisterProtobufType(ctx context.Context, subject string, protoType protoreflect.Message) (uint32, error)

func (*Client) Serialize added in v1.0.1

func (c *Client) Serialize(ctx context.Context, subject string, value interface{}) ([]byte, error)

type Config added in v1.1.2

type Config struct {
	LogLevel LogLevel
	Tls      *tls.Config
	Url      string
}

func (*Config) AddCaCert added in v1.1.7

func (c *Config) AddCaCert(caPemFile string) error

func (*Config) AddClientCert added in v1.1.7

func (c *Config) AddClientCert(certFile, keyFile, keyPass string) error

func (*Config) LogCaches added in v1.1.2

func (c *Config) LogCaches() bool

func (*Config) LogEntities added in v1.1.4

func (c *Config) LogEntities() bool

func (*Config) LogHttp added in v1.1.2

func (c *Config) LogHttp() bool

func (*Config) LogWarnings added in v1.1.2

func (c *Config) LogWarnings() bool

type LogLevel added in v1.1.2

type LogLevel uint32
const LogCaches LogLevel = 4
const LogEverything LogLevel = 255
const LogHttp LogLevel = 2
const LogNothing LogLevel = 0
const LogWarnings LogLevel = 1

type ProtobufSchema added in v1.0.2

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

func NewProtobufSchema added in v1.0.2

func NewProtobufSchema(d protoreflect.FileDescriptor) (*ProtobufSchema, error)

func (*ProtobufSchema) Print added in v1.0.3

func (s *ProtobufSchema) Print()

func (*ProtobufSchema) Render added in v1.0.2

func (s *ProtobufSchema) Render() (string, error)

func (*ProtobufSchema) Type added in v1.0.2

func (s *ProtobufSchema) Type() string

type Schema

type Schema interface {
	Render() (string, error)
	Type() string
}

Jump to

Keyboard shortcuts

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