format

package
v0.0.0-rc1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfluentJSONSchema

type ConfluentJSONSchema struct {
	ConnectIndex *int `json:"connect.index,omitempty"`

	ConnectParameters *JSONSchemaParameters `json:"connect.parameters,omitempty"`

	ConnectType     string                         `json:"connect.type,omitempty"`
	ConnectVersion  int                            `json:"connect.version,omitempty"`
	Default         interface{}                    `json:"default,omitempty"`
	Description     string                         `json:"description,omitempty"`
	Items           *ConfluentJSONSchema           `json:"items,omitempty"`
	OneOf           []ConfluentJSONSchema          `json:"oneOf,omitempty"`
	Properties      map[string]ConfluentJSONSchema `json:"properties,omitempty"`
	Title           string                         `json:"title,omitempty"`
	Type            string                         `json:"type,omitempty"`
	DtOriginalTypes interface{}                    `json:"__dt_original_type_info,omitempty"`
}

func (ConfluentJSONSchema) ToKafkaSchema

func (p ConfluentJSONSchema) ToKafkaSchema() KafkaJSONSchema

type JSONSchemaParameters

type JSONSchemaParameters struct {
	Length                  string `json:"length,omitempty"`
	ConnectDecimalPrecision string `json:"connect.decimal.precision,omitempty"`
	Scale                   string `json:"scale,omitempty"`
	Allowed                 string `json:"allowed,omitempty"`
}

type KafkaJSONSchema

type KafkaJSONSchema struct {
	Type            string                `json:"type"`
	Fields          []KafkaJSONSchema     `json:"fields,omitempty"`
	Optional        bool                  `json:"optional"`
	Name            string                `json:"name,omitempty"`
	Version         int                   `json:"version,omitempty"`
	Doc             string                `json:"doc,omitempty"`
	Parameters      *JSONSchemaParameters `json:"parameters,omitempty"`
	Default         interface{}           `json:"default,omitempty"`
	Items           *KafkaJSONSchema      `json:"items,omitempty"`
	Field           string                `json:"field,omitempty"`
	DtOriginalTypes interface{}           `json:"__dt_original_type_info,omitempty"`
}

func KafkaJSONSchemaFromArr

func KafkaJSONSchemaFromArr(rawJSONSchema []byte) (*KafkaJSONSchema, error)

KafkaJSONSchemaFromArr convert KafkaJSONSchema as []byte to struct KafkaJSONSchema

func (KafkaJSONSchema) ToConfluentSchema

func (p KafkaJSONSchema) ToConfluentSchema() ConfluentJSONSchema

Jump to

Keyboard shortcuts

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