schemas

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const DEFAULT_SCHEMA = "default.schema"

Variables

This section is empty.

Functions

This section is empty.

Types

type API

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

func NewAPI

func NewAPI(service ServiceInterface, logger logging.LoggerInterface) *API

func (*API) RegisterEndpoints

func (a *API) RegisterEndpoints(mux *chi.Mux)

type Config

type Config struct {
	Name      string
	Namespace string
	K8s       coreV1.CoreV1Interface
	Kratos    kClient.IdentityApi
}

type DefaultSchema

type DefaultSchema struct {
	ID string `json:"schema_id"`
}

type IdentitySchemaData

type IdentitySchemaData struct {
	IdentitySchemas []kClient.IdentitySchemaContainer
	Error           *kClient.GenericError
}

type KratosError

type KratosError struct {
	Error *kClient.GenericError `json:"error,omitempty"`
}

TODO @shipperizer verify during integration test if this is actually the format

type Service

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

func NewService

func NewService(config *Config, tracer trace.Tracer, monitor monitoring.MonitorInterface, logger logging.LoggerInterface) *Service

TODO @shipperizer analyze if providers IDs need to be what we use for path or if filename is the right one

func (*Service) CreateSchema

func (*Service) DeleteSchema

func (s *Service) DeleteSchema(ctx context.Context, ID string) error

func (*Service) EditSchema

func (*Service) GetDefaultSchema

func (s *Service) GetDefaultSchema(ctx context.Context) (*DefaultSchema, error)

func (*Service) GetSchema

func (s *Service) GetSchema(ctx context.Context, ID string) (*IdentitySchemaData, error)

func (*Service) ListSchemas

func (s *Service) ListSchemas(ctx context.Context, page, size int64) (*IdentitySchemaData, error)

func (*Service) UpdateDefaultSchema

func (s *Service) UpdateDefaultSchema(ctx context.Context, schemaID *DefaultSchema) (*DefaultSchema, error)

Jump to

Keyboard shortcuts

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