models

package
v0.0.0-...-f8652d3 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NextSequenceID

func NextSequenceID(db *gorm.DB, name SequenceName) (int64, error)

Types

type Schema

type Schema struct {
	gorm.Model
	ID         uuid.UUID
	GlobalID   int32
	Schema     string
	Hash       string
	SchemaType SchemaType
	CreatedAt  time.Time
	UpdatedAt  time.Time
	DeletedAt  gorm.DeletedAt
}

type SchemaReference

type SchemaReference struct {
	ID               uuid.UUID
	SchemaID         uuid.UUID
	SubjectVersionID uuid.UUID
	Name             string
	CreatedAt        time.Time
	UpdatedAt        time.Time

	Schema         Schema
	SubjectVersion SubjectVersion
}

type SchemaType

type SchemaType string
const (
	SchemaTypeAvro     SchemaType = "AVRO"
	SchemaTypeJSON     SchemaType = "JSON"
	SchemaTypeProtobuf SchemaType = "PROTOBUF"
)

type Sequence

type Sequence struct {
	Name      SequenceName `gorm:"primarykey"`
	NextValue int64
}

type SequenceName

type SequenceName string
const (
	SequenceNameSchemaIDs SequenceName = "SCHEMA_IDS"
)

type Subject

type Subject struct {
	gorm.Model
	ID            uuid.UUID
	Name          string
	Compatibility SubjectCompatibility
	CreatedAt     time.Time
	UpdatedAt     time.Time
	DeletedAt     gorm.DeletedAt
}

type SubjectCompatibility

type SubjectCompatibility string
const (
	SubjectCompatibilityBackward           SubjectCompatibility = "BACKWARD"
	SubjectCompatibilityBackwardTransitive SubjectCompatibility = "BACKWARD_TRANSITIVE"
	SubjectCompatibilityForward            SubjectCompatibility = "FORWARD"
	SubjectCompatibilityForwardTransitive  SubjectCompatibility = "FORWARD_TRANSITIVE"
	SubjectCompatibilityFull               SubjectCompatibility = "FULL"
	SubjectCompatibilityFullTransitive     SubjectCompatibility = "FULL_TRANSITIVE"
	SubjectCompatibilityNone               SubjectCompatibility = "NONE"
)

type SubjectVersion

type SubjectVersion struct {
	gorm.Model
	ID        uuid.UUID
	SubjectID uuid.UUID
	SchemaID  uuid.UUID
	Version   int32
	CreatedAt time.Time
	DeletedAt gorm.DeletedAt

	Subject Subject
	Schema  Schema
}

Jump to

Keyboard shortcuts

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