kafkaschemaregistry

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2024 License: Apache-2.0 Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompatibilityTypeChoices

func CompatibilityTypeChoices() []string

func PermissionTypeChoices

func PermissionTypeChoices() []string

func SchemaTypeChoices

func SchemaTypeChoices() []string

Types

type AclOut

type AclOut struct {
	Id         *string        `json:"id,omitempty"` // ID
	Permission PermissionType `json:"permission"`   // ACL entry for Schema Registry
	Resource   string         `json:"resource"`     // Schema Registry ACL entry resource name pattern
	Username   string         `json:"username"`
}

type CompatibilityType

type CompatibilityType string
const (
	CompatibilityTypeBackward           CompatibilityType = "BACKWARD"
	CompatibilityTypeBackwardTransitive CompatibilityType = "BACKWARD_TRANSITIVE"
	CompatibilityTypeForward            CompatibilityType = "FORWARD"
	CompatibilityTypeForwardTransitive  CompatibilityType = "FORWARD_TRANSITIVE"
	CompatibilityTypeFull               CompatibilityType = "FULL"
	CompatibilityTypeFullTransitive     CompatibilityType = "FULL_TRANSITIVE"
	CompatibilityTypeNone               CompatibilityType = "NONE"
)

type Handler

type Handler interface {
	// ServiceSchemaRegistryAclAdd add a Schema Registry ACL entry
	// POST /v1/project/{project}/service/{service_name}/kafka/schema-registry/acl
	// https://api.aiven.io/doc/#tag/Service:_Kafka/operation/ServiceSchemaRegistryAclAdd
	ServiceSchemaRegistryAclAdd(ctx context.Context, project string, serviceName string, in *ServiceSchemaRegistryAclAddIn) ([]AclOut, error)

	// ServiceSchemaRegistryAclDelete delete a Schema Registry ACL entry
	// DELETE /v1/project/{project}/service/{service_name}/kafka/schema-registry/acl/{schema_registry_acl_id}
	// https://api.aiven.io/doc/#tag/Service:_Kafka/operation/ServiceSchemaRegistryAclDelete
	ServiceSchemaRegistryAclDelete(ctx context.Context, project string, serviceName string, schemaRegistryAclId string) ([]AclOut, error)

	// ServiceSchemaRegistryAclList list Schema Registry ACL entries
	// GET /v1/project/{project}/service/{service_name}/kafka/schema-registry/acl
	// https://api.aiven.io/doc/#tag/Service:_Kafka/operation/ServiceSchemaRegistryAclList
	ServiceSchemaRegistryAclList(ctx context.Context, project string, serviceName string) ([]AclOut, error)

	// ServiceSchemaRegistryCompatibility check compatibility of schema in Schema Registry
	// POST /v1/project/{project}/service/{service_name}/kafka/schema/compatibility/subjects/{subject_name}/versions/{version_id}
	// https://api.aiven.io/doc/#tag/Service:_Kafka/operation/ServiceSchemaRegistryCompatibility
	ServiceSchemaRegistryCompatibility(ctx context.Context, project string, serviceName string, subjectName string, versionId int, in *ServiceSchemaRegistryCompatibilityIn) (bool, error)

	// ServiceSchemaRegistryGlobalConfigGet get global configuration for Schema Registry
	// GET /v1/project/{project}/service/{service_name}/kafka/schema/config
	// https://api.aiven.io/doc/#tag/Service:_Kafka/operation/ServiceSchemaRegistryGlobalConfigGet
	ServiceSchemaRegistryGlobalConfigGet(ctx context.Context, project string, serviceName string) (CompatibilityType, error)

	// ServiceSchemaRegistryGlobalConfigPut edit global configuration for Schema Registry
	// PUT /v1/project/{project}/service/{service_name}/kafka/schema/config
	// https://api.aiven.io/doc/#tag/Service:_Kafka/operation/ServiceSchemaRegistryGlobalConfigPut
	ServiceSchemaRegistryGlobalConfigPut(ctx context.Context, project string, serviceName string, in *ServiceSchemaRegistryGlobalConfigPutIn) (CompatibilityType, error)

	// ServiceSchemaRegistrySchemaGet get schema in Schema Registry
	// GET /v1/project/{project}/service/{service_name}/kafka/schema/schemas/ids/{schema_id}
	// https://api.aiven.io/doc/#tag/Service:_Kafka/operation/ServiceSchemaRegistrySchemaGet
	ServiceSchemaRegistrySchemaGet(ctx context.Context, project string, serviceName string, schemaId string) error

	// ServiceSchemaRegistrySubjectConfigGet get configuration for Schema Registry subject
	// GET /v1/project/{project}/service/{service_name}/kafka/schema/config/{subject_name}
	// https://api.aiven.io/doc/#tag/Service:_Kafka/operation/ServiceSchemaRegistrySubjectConfigGet
	ServiceSchemaRegistrySubjectConfigGet(ctx context.Context, project string, serviceName string, subjectName string) (CompatibilityType, error)

	// ServiceSchemaRegistrySubjectConfigPut edit configuration for Schema Registry subject
	// PUT /v1/project/{project}/service/{service_name}/kafka/schema/config/{subject_name}
	// https://api.aiven.io/doc/#tag/Service:_Kafka/operation/ServiceSchemaRegistrySubjectConfigPut
	ServiceSchemaRegistrySubjectConfigPut(ctx context.Context, project string, serviceName string, subjectName string, in *ServiceSchemaRegistrySubjectConfigPutIn) (CompatibilityType, error)

	// ServiceSchemaRegistrySubjectDelete delete Schema Registry subject
	// DELETE /v1/project/{project}/service/{service_name}/kafka/schema/subjects/{subject_name}
	// https://api.aiven.io/doc/#tag/Service:_Kafka/operation/ServiceSchemaRegistrySubjectDelete
	ServiceSchemaRegistrySubjectDelete(ctx context.Context, project string, serviceName string, subjectName string) error

	// ServiceSchemaRegistrySubjectVersionDelete delete Schema Registry subject version
	// DELETE /v1/project/{project}/service/{service_name}/kafka/schema/subjects/{subject_name}/versions/{version_id}
	// https://api.aiven.io/doc/#tag/Service:_Kafka/operation/ServiceSchemaRegistrySubjectVersionDelete
	ServiceSchemaRegistrySubjectVersionDelete(ctx context.Context, project string, serviceName string, subjectName string, versionId int) error

	// ServiceSchemaRegistrySubjectVersionGet get Schema Registry Subject version
	// GET /v1/project/{project}/service/{service_name}/kafka/schema/subjects/{subject_name}/versions/{version_id}
	// https://api.aiven.io/doc/#tag/Service:_Kafka/operation/ServiceSchemaRegistrySubjectVersionGet
	ServiceSchemaRegistrySubjectVersionGet(ctx context.Context, project string, serviceName string, subjectName string, versionId int) error

	// ServiceSchemaRegistrySubjectVersionPost register a new Schema in Schema Registry
	// POST /v1/project/{project}/service/{service_name}/kafka/schema/subjects/{subject_name}/versions
	// https://api.aiven.io/doc/#tag/Service:_Kafka/operation/ServiceSchemaRegistrySubjectVersionPost
	ServiceSchemaRegistrySubjectVersionPost(ctx context.Context, project string, serviceName string, subjectName string, in *ServiceSchemaRegistrySubjectVersionPostIn) (int, error)

	// ServiceSchemaRegistrySubjectVersionsGet get Schema Registry subject versions
	// GET /v1/project/{project}/service/{service_name}/kafka/schema/subjects/{subject_name}/versions
	// https://api.aiven.io/doc/#tag/Service:_Kafka/operation/ServiceSchemaRegistrySubjectVersionsGet
	ServiceSchemaRegistrySubjectVersionsGet(ctx context.Context, project string, serviceName string, subjectName string) ([]int, error)

	// ServiceSchemaRegistrySubjects lists Schema Registry subjects
	// GET /v1/project/{project}/service/{service_name}/kafka/schema/subjects
	// https://api.aiven.io/doc/#tag/Service:_Kafka/operation/ServiceSchemaRegistrySubjects
	ServiceSchemaRegistrySubjects(ctx context.Context, project string, serviceName string) ([]string, error)
}

type KafkaSchemaRegistryHandler

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

func NewHandler

func NewHandler(doer doer) KafkaSchemaRegistryHandler

func (*KafkaSchemaRegistryHandler) ServiceSchemaRegistryAclAdd

func (h *KafkaSchemaRegistryHandler) ServiceSchemaRegistryAclAdd(ctx context.Context, project string, serviceName string, in *ServiceSchemaRegistryAclAddIn) ([]AclOut, error)

func (*KafkaSchemaRegistryHandler) ServiceSchemaRegistryAclDelete

func (h *KafkaSchemaRegistryHandler) ServiceSchemaRegistryAclDelete(ctx context.Context, project string, serviceName string, schemaRegistryAclId string) ([]AclOut, error)

func (*KafkaSchemaRegistryHandler) ServiceSchemaRegistryAclList

func (h *KafkaSchemaRegistryHandler) ServiceSchemaRegistryAclList(ctx context.Context, project string, serviceName string) ([]AclOut, error)

func (*KafkaSchemaRegistryHandler) ServiceSchemaRegistryCompatibility

func (h *KafkaSchemaRegistryHandler) ServiceSchemaRegistryCompatibility(ctx context.Context, project string, serviceName string, subjectName string, versionId int, in *ServiceSchemaRegistryCompatibilityIn) (bool, error)

func (*KafkaSchemaRegistryHandler) ServiceSchemaRegistryGlobalConfigGet

func (h *KafkaSchemaRegistryHandler) ServiceSchemaRegistryGlobalConfigGet(ctx context.Context, project string, serviceName string) (CompatibilityType, error)

func (*KafkaSchemaRegistryHandler) ServiceSchemaRegistryGlobalConfigPut

func (h *KafkaSchemaRegistryHandler) ServiceSchemaRegistryGlobalConfigPut(ctx context.Context, project string, serviceName string, in *ServiceSchemaRegistryGlobalConfigPutIn) (CompatibilityType, error)

func (*KafkaSchemaRegistryHandler) ServiceSchemaRegistrySchemaGet

func (h *KafkaSchemaRegistryHandler) ServiceSchemaRegistrySchemaGet(ctx context.Context, project string, serviceName string, schemaId string) error

func (*KafkaSchemaRegistryHandler) ServiceSchemaRegistrySubjectConfigGet

func (h *KafkaSchemaRegistryHandler) ServiceSchemaRegistrySubjectConfigGet(ctx context.Context, project string, serviceName string, subjectName string) (CompatibilityType, error)

func (*KafkaSchemaRegistryHandler) ServiceSchemaRegistrySubjectConfigPut

func (h *KafkaSchemaRegistryHandler) ServiceSchemaRegistrySubjectConfigPut(ctx context.Context, project string, serviceName string, subjectName string, in *ServiceSchemaRegistrySubjectConfigPutIn) (CompatibilityType, error)

func (*KafkaSchemaRegistryHandler) ServiceSchemaRegistrySubjectDelete

func (h *KafkaSchemaRegistryHandler) ServiceSchemaRegistrySubjectDelete(ctx context.Context, project string, serviceName string, subjectName string) error

func (*KafkaSchemaRegistryHandler) ServiceSchemaRegistrySubjectVersionDelete

func (h *KafkaSchemaRegistryHandler) ServiceSchemaRegistrySubjectVersionDelete(ctx context.Context, project string, serviceName string, subjectName string, versionId int) error

func (*KafkaSchemaRegistryHandler) ServiceSchemaRegistrySubjectVersionGet

func (h *KafkaSchemaRegistryHandler) ServiceSchemaRegistrySubjectVersionGet(ctx context.Context, project string, serviceName string, subjectName string, versionId int) error

func (*KafkaSchemaRegistryHandler) ServiceSchemaRegistrySubjectVersionPost

func (h *KafkaSchemaRegistryHandler) ServiceSchemaRegistrySubjectVersionPost(ctx context.Context, project string, serviceName string, subjectName string, in *ServiceSchemaRegistrySubjectVersionPostIn) (int, error)

func (*KafkaSchemaRegistryHandler) ServiceSchemaRegistrySubjectVersionsGet

func (h *KafkaSchemaRegistryHandler) ServiceSchemaRegistrySubjectVersionsGet(ctx context.Context, project string, serviceName string, subjectName string) ([]int, error)

func (*KafkaSchemaRegistryHandler) ServiceSchemaRegistrySubjects

func (h *KafkaSchemaRegistryHandler) ServiceSchemaRegistrySubjects(ctx context.Context, project string, serviceName string) ([]string, error)

type PermissionType

type PermissionType string
const (
	PermissionTypeSchemaRegistryRead  PermissionType = "schema_registry_read"
	PermissionTypeSchemaRegistryWrite PermissionType = "schema_registry_write"
)

type ReferenceIn

type ReferenceIn struct {
	Name    string `json:"name"`
	Subject string `json:"subject"`
	Version int    `json:"version"`
}

type SchemaType

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

type ServiceSchemaRegistryAclAddIn

type ServiceSchemaRegistryAclAddIn struct {
	Permission PermissionType `json:"permission"` // ACL entry for Schema Registry
	Resource   string         `json:"resource"`   // Schema Registry ACL entry resource name pattern
	Username   string         `json:"username"`
}

ServiceSchemaRegistryAclAddIn ServiceSchemaRegistryAclAddRequestBody

type ServiceSchemaRegistryCompatibilityIn

type ServiceSchemaRegistryCompatibilityIn struct {
	Schema     string     `json:"schema"`
	SchemaType SchemaType `json:"schemaType,omitempty"` // Schema type
}

ServiceSchemaRegistryCompatibilityIn ServiceSchemaRegistryCompatibilityRequestBody

type ServiceSchemaRegistryGlobalConfigPutIn

type ServiceSchemaRegistryGlobalConfigPutIn struct {
	Compatibility CompatibilityType `json:"compatibility"` // Configuration
}

ServiceSchemaRegistryGlobalConfigPutIn ServiceSchemaRegistryGlobalConfigPutRequestBody

type ServiceSchemaRegistrySubjectConfigPutIn

type ServiceSchemaRegistrySubjectConfigPutIn struct {
	Compatibility CompatibilityType `json:"compatibility"` // Configuration
}

ServiceSchemaRegistrySubjectConfigPutIn ServiceSchemaRegistrySubjectConfigPutRequestBody

type ServiceSchemaRegistrySubjectVersionPostIn

type ServiceSchemaRegistrySubjectVersionPostIn struct {
	References *[]ReferenceIn `json:"references,omitempty"` // Schema references
	Schema     string         `json:"schema"`
	SchemaType SchemaType     `json:"schemaType,omitempty"` // Schema type
}

ServiceSchemaRegistrySubjectVersionPostIn ServiceSchemaRegistrySubjectVersionPostRequestBody

Jump to

Keyboard shortcuts

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