confluent

package
v0.0.0-rc11 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	Code    int    `json:"error_code"`
	Message string `json:"message"`
}

Error implements error, encodes HTTP errors from Schema Registry.

func (Error) Error

func (e Error) Error() string

type Schema

type Schema struct {
	ID         int    // global schema ID, -1 if unknown (in references, for example)
	Schema     string // body
	SchemaType SchemaType
	References []SchemaReference
}

type SchemaReference

type SchemaReference struct {
	Name        string
	SubjectName string
	Version     int32
}

type SchemaRegistryClient

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

func NewSchemaRegistryClientWithTransport

func NewSchemaRegistryClientWithTransport(schemaRegistryRawURLs string, caCert string, logger log.Logger) (*SchemaRegistryClient, error)

func (*SchemaRegistryClient) CachingEnabled

func (c *SchemaRegistryClient) CachingEnabled(value bool)

func (*SchemaRegistryClient) CreateSchema

func (c *SchemaRegistryClient) CreateSchema(subject string, schema string, schemaType SchemaType) (int, error)

func (*SchemaRegistryClient) GetSchema

func (c *SchemaRegistryClient) GetSchema(schemaID int) (*Schema, error)

func (*SchemaRegistryClient) GetSchemaBySubjectVersion

func (c *SchemaRegistryClient) GetSchemaBySubjectVersion(subject string, version int32) (*Schema, error)

func (*SchemaRegistryClient) IsAuthorized

func (c *SchemaRegistryClient) IsAuthorized() (bool, error)

func (*SchemaRegistryClient) ResetCache

func (c *SchemaRegistryClient) ResetCache()

func (*SchemaRegistryClient) ResolveReferencesRecursive

func (c *SchemaRegistryClient) ResolveReferencesRecursive(references []SchemaReference) (map[string]Schema, error)

func (*SchemaRegistryClient) SetBearerToken

func (c *SchemaRegistryClient) SetBearerToken(token string)

func (*SchemaRegistryClient) SetCredentials

func (c *SchemaRegistryClient) SetCredentials(username string, password string)

type SchemaType

type SchemaType string
const (
	PROTOBUF SchemaType = "PROTOBUF"
	AVRO     SchemaType = "AVRO"
	JSON     SchemaType = "JSON"
)

func (SchemaType) String

func (s SchemaType) String() string

Jump to

Keyboard shortcuts

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