usecases

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SchemaRegistryImpl

type SchemaRegistryImpl struct {
	RegistryURL *url.URL
}

SchemaRegistryImpl ...

func (SchemaRegistryImpl) PublishSchema

func (s SchemaRegistryImpl) PublishSchema(ctx context.Context, service dto.Service, dir, extension string) (*dto.SchemaStatus, error)

PublishSchema pushes the schema to schema registry

func (SchemaRegistryImpl) ValidateSchema

func (s SchemaRegistryImpl) ValidateSchema(ctx context.Context, service dto.Service, dir, extension string) (*dto.SchemaStatus, error)

ValidateSchema is validates a services schema against the graph in schema registry

type SchemaRegistryUsecase

type SchemaRegistryUsecase interface {
	PublishSchema(ctx context.Context, service dto.Service, dir, extension string) (*dto.SchemaStatus, error)
	ValidateSchema(ctx context.Context, service dto.Service, dir, extension string) (*dto.SchemaStatus, error)
}

SchemaRegistryUsecase defines methods for the schema registry

func NewSchemaRegistryImpl

func NewSchemaRegistryImpl() (SchemaRegistryUsecase, error)

NewSchemaRegistryImpl new Schema registry usecase implementation

type UsecaseImpl

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

UsecaseImpl is the implementation of the usecase interface

func (UsecaseImpl) PublishSchema

func (u UsecaseImpl) PublishSchema(ctx context.Context, service dto.Service, dir, extension string) (*dto.SchemaStatus, error)

PublishSchema pushes the schema to schema registry

func (UsecaseImpl) ValidateSchema

func (u UsecaseImpl) ValidateSchema(ctx context.Context, service dto.Service, dir, extension string) (*dto.SchemaStatus, error)

ValidateSchema is validates a services schema against the graph in schema registry

type Usecases

type Usecases interface {
	SchemaRegistryUsecase
}

Usecases is a collection of all usecases

func NewUsecaseImpl

func NewUsecaseImpl() (Usecases, error)

NewUsecaseImpl initializes a new implementation of usecases interface

Jump to

Keyboard shortcuts

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