api

package
v0.0.0-...-90a5f25 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Ping

func Ping(c *gin.Context)

Ping handler

Types

type API

API holds all handlers

func (*API) Check

Check grpc health check

func (*API) DownloadDescriptor

DownloadDescriptor grpc handler to download schema data

func (*API) HTTPDownload

func (a *API) HTTPDownload(c *gin.Context)

HTTPDownload http handler to download requested schema data

func (*API) HTTPUpload

func (a *API) HTTPUpload(c *gin.Context)

HTTPUpload http handler to schema data with metadata information

func (*API) ListSnapshots

ListSnapshots returns list of snapshots. If filters applied it will return filtered snapshot list

func (*API) PromoteSnapshot

PromoteSnapshot marks specified snapshot as latest

func (*API) UploadDescriptor

UploadDescriptor grpc handler to upload schema data with metadata information

type MetadataService

type MetadataService interface {
	Exists(context.Context, *snapshot.Snapshot) bool
	List(context.Context, *snapshot.Snapshot) ([]*snapshot.Snapshot, error)
	GetSnapshotByFields(context.Context, string, string, string, bool) (*snapshot.Snapshot, error)
	GetSnapshotByID(context.Context, int64) (*snapshot.Snapshot, error)
	UpdateLatestVersion(context.Context, *snapshot.Snapshot) error
}

MetadataService Service Interface for metadata store

type StoreService

type StoreService interface {
	Validate(context.Context, *snapshot.Snapshot, []byte, []string) error
	Insert(context.Context, *snapshot.Snapshot, []byte) error
	Get(context.Context, *snapshot.Snapshot, []string) ([]byte, error)
}

StoreService Service Interface for storage and validation

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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