Documentation ¶
Index ¶
- func Ping(c *gin.Context)
- type API
- func (s *API) Check(ctx context.Context, in *grpc_health_v1.HealthCheckRequest) (*grpc_health_v1.HealthCheckResponse, error)
- func (a *API) DownloadDescriptor(ctx context.Context, req *stencilv1.DownloadDescriptorRequest) (*stencilv1.DownloadDescriptorResponse, error)
- func (a *API) HTTPDownload(c *gin.Context)
- func (a *API) HTTPUpload(c *gin.Context)
- func (a *API) ListSnapshots(ctx context.Context, req *stencilv1.ListSnapshotsRequest) (*stencilv1.ListSnapshotsResponse, error)
- func (a *API) PromoteSnapshot(ctx context.Context, req *stencilv1.PromoteSnapshotRequest) (*stencilv1.PromoteSnapshotResponse, error)
- func (a *API) UploadDescriptor(ctx context.Context, req *stencilv1.UploadDescriptorRequest) (*stencilv1.UploadDescriptorResponse, error)
- type MetadataService
- type StoreService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type API ¶
type API struct { stencilv1.UnimplementedStencilServiceServer grpc_health_v1.UnimplementedHealthServer Store StoreService Metadata MetadataService }
API holds all handlers
func (*API) Check ¶
func (s *API) Check(ctx context.Context, in *grpc_health_v1.HealthCheckRequest) (*grpc_health_v1.HealthCheckResponse, error)
Check grpc health check
func (*API) DownloadDescriptor ¶
func (a *API) DownloadDescriptor(ctx context.Context, req *stencilv1.DownloadDescriptorRequest) (*stencilv1.DownloadDescriptorResponse, error)
DownloadDescriptor grpc handler to download schema data
func (*API) HTTPDownload ¶
HTTPDownload http handler to download requested schema data
func (*API) HTTPUpload ¶
HTTPUpload http handler to schema data with metadata information
func (*API) ListSnapshots ¶
func (a *API) ListSnapshots(ctx context.Context, req *stencilv1.ListSnapshotsRequest) (*stencilv1.ListSnapshotsResponse, error)
ListSnapshots returns list of snapshots. If filters applied it will return filtered snapshot list
func (*API) PromoteSnapshot ¶
func (a *API) PromoteSnapshot(ctx context.Context, req *stencilv1.PromoteSnapshotRequest) (*stencilv1.PromoteSnapshotResponse, error)
PromoteSnapshot marks specified snapshot as latest
func (*API) UploadDescriptor ¶
func (a *API) UploadDescriptor(ctx context.Context, req *stencilv1.UploadDescriptorRequest) (*stencilv1.UploadDescriptorResponse, error)
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
Source Files ¶
Click to show internal directories.
Click to hide internal directories.