asyncapi_srv

package
v0.0.0-...-2a83a9b Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitLogger

func InitLogger()

Types

type Service

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

func New

func New(storageHdl StorageHandler) *Service

func (*Service) AsyncapiDeleteDoc

func (s *Service) AsyncapiDeleteDoc(ctx context.Context, id string) error

func (*Service) AsyncapiGetDoc

func (s *Service) AsyncapiGetDoc(ctx context.Context, id string) ([]byte, error)

func (*Service) AsyncapiGetDocs

func (s *Service) AsyncapiGetDocs(ctx context.Context) ([]json.RawMessage, error)

func (*Service) AsyncapiListStorage

func (s *Service) AsyncapiListStorage(ctx context.Context) ([]lib_models.AsyncapiItem, error)

func (*Service) AsyncapiPutDoc

func (s *Service) AsyncapiPutDoc(ctx context.Context, id string, data []byte) error

type StorageHandler

type StorageHandler interface {
	List(ctx context.Context) ([]models.StorageData, error)
	Write(ctx context.Context, id string, args [][2]string, data []byte) error
	Read(ctx context.Context, id string) ([]byte, error)
	Delete(ctx context.Context, id string) error
}

Jump to

Keyboard shortcuts

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