Documentation ¶
Index ¶
- type Cache
- type CompatibilityFn
- type Metadata
- type NamespaceService
- type ParsedSchema
- type Provider
- type Repository
- type Schema
- type SchemaFile
- type SchemaInfo
- type Service
- func (s *Service) CheckCompatibility(ctx context.Context, nsName, schemaName, compatibility string, data []byte) error
- func (s *Service) Create(ctx context.Context, nsName string, schemaName string, metadata *Metadata, ...) (SchemaInfo, error)
- func (s *Service) Delete(ctx context.Context, namespace string, schemaName string) error
- func (s *Service) DeleteVersion(ctx context.Context, namespace string, schemaName string, version int32) error
- func (s *Service) Get(ctx context.Context, namespace string, schemaName string, version int32) (*Metadata, []byte, error)
- func (s *Service) GetLatest(ctx context.Context, namespace string, schemaName string) (*Metadata, []byte, error)
- func (s *Service) GetMetadata(ctx context.Context, namespace, schemaName string) (*Metadata, error)
- func (s *Service) List(ctx context.Context, namespaceID string) ([]Schema, error)
- func (s *Service) ListVersions(ctx context.Context, namespaceID string, schemaName string) ([]int32, error)
- func (s *Service) UpdateMetadata(ctx context.Context, namespace, schemaName string, meta *Metadata) (*Metadata, error)
- type ValidationStrategy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CompatibilityFn ¶
type CompatibilityFn func(ParsedSchema, []ParsedSchema) error
type NamespaceService ¶
type ParsedSchema ¶
type ParsedSchema interface { IsBackwardCompatible(ParsedSchema) error IsForwardCompatible(ParsedSchema) error IsFullCompatible(ParsedSchema) error Format() string GetCanonicalValue() *SchemaFile }
type Provider ¶
type Provider interface {
ParseSchema(format string, data []byte) (ParsedSchema, error)
}
type Repository ¶
type Repository interface { Create(ctx context.Context, namespace string, schema string, metadata *Metadata, versionID string, schemaFile *SchemaFile) (version int32, err error) List(context.Context, string) ([]Schema, error) ListVersions(context.Context, string, string) ([]int32, error) Get(context.Context, string, string, int32) ([]byte, error) GetLatestVersion(context.Context, string, string) (int32, error) GetMetadata(context.Context, string, string) (*Metadata, error) UpdateMetadata(context.Context, string, string, *Metadata) (*Metadata, error) Delete(context.Context, string, string) error DeleteVersion(context.Context, string, string, int32) error }
type SchemaInfo ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(repo Repository, provider Provider, nsSvc NamespaceService, cache Cache) *Service
func (*Service) CheckCompatibility ¶
func (*Service) DeleteVersion ¶
func (*Service) GetMetadata ¶
func (*Service) ListVersions ¶
type ValidationStrategy ¶
type ValidationStrategy func(ParsedSchema, ParsedSchema) error
Click to show internal directories.
Click to hide internal directories.