csrc

package
v3.29.0 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2023 License: Apache-2.0, Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicAuth

type BasicAuth struct {
	KafkaSchemaApiKey    string
	KafkaSchemaApiSecret string
}

type Client

type Client struct {
	URL string

	Auth *BasicAuth
	// contains filtered or unexported fields
}

func NewClient

func NewClient(url string, tlsConfig *tls.Config, authConfig *BasicAuth) *Client

func (*Client) GetSchema

func (c *Client) GetSchema(id int) (string, error)

GetSchema gets the schema with the ID. https://docs.confluent.io/current/schema-registry/develop/api.html#get--schemas-ids-int-%20id

func (*Client) PostSubjects

func (c *Client) PostSubjects(subj, schema string) (*SchemaResponse, error)

type ErrorResponse

type ErrorResponse struct {
	StatusCode int    `json:"error_code"`
	Body       string `json:"message"`
}

func (*ErrorResponse) Error

func (e *ErrorResponse) Error() string

type SchemaResponse

type SchemaResponse struct {
	Schema  string `json:"schema"`  // The actual AVRO schema
	Subject string `json:"subject"` // Subject where the schema is registered for
	Version int    `json:"version"` // Version within this subject
	ID      int    `json:"id"`      // Registry's unique id
}

Jump to

Keyboard shortcuts

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