api

package
v0.8.7 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HeaderFormat        = "X-Format"
	HeaderCompatibility = "X-Compatibility"
	HeaderSourceUrl     = "X-SourceURL"
	HeaderCommitSHA     = "X-CommitSHA"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	stencilv1beta1.UnimplementedStencilServiceServer
	grpc_health_v1.UnimplementedHealthServer
	// contains filtered or unexported fields
}

func NewAPI

func NewAPI(namespace NamespaceService, schema SchemaService, search SearchService, nr newrelic2.Service) *API

func (*API) Check

Check grpc health check

func (*API) CreateNamespace

CreateNamespace handler for creating namespace

func (*API) DetectSchemaChange added in v0.8.5

func (a *API) DetectSchemaChange(writer http.ResponseWriter, request *http.Request, pathParams map[string]string) error

func (*API) HTTPCheckCompatibility

func (a *API) HTTPCheckCompatibility(w http.ResponseWriter, req *http.Request, pathParams map[string]string) error

func (*API) HTTPGetSchema

func (a *API) HTTPGetSchema(w http.ResponseWriter, req *http.Request, pathParams map[string]string) (*schema.Metadata, []byte, error)

func (*API) HTTPLatestSchema

func (a *API) HTTPLatestSchema(w http.ResponseWriter, req *http.Request, pathParams map[string]string) (*schema.Metadata, []byte, error)

func (*API) HTTPUpload

func (a *API) HTTPUpload(w http.ResponseWriter, req *http.Request, pathParams map[string]string) error

func (*API) ListNamespaces

ListNamespaces handler for returning list of available namespaces

func (*API) RegisterSchemaHandlers

func (a *API) RegisterSchemaHandlers(mux *runtime.ServeMux, app *newrelic.Application)

RegisterSchemaHandlers registers HTTP handlers for schema download

type NamespaceService

type NamespaceService interface {
	Create(ctx context.Context, ns namespace.Namespace) (namespace.Namespace, error)
	Update(ctx context.Context, ns namespace.Namespace) (namespace.Namespace, error)
	List(ctx context.Context) ([]namespace.Namespace, error)
	Get(ctx context.Context, name string) (namespace.Namespace, error)
	Delete(ctx context.Context, name string) error
}

type SchemaService

type SchemaService interface {
	CheckCompatibility(ctx context.Context, nsName, schemaName, compatibility string, data []byte) error
	Create(ctx context.Context, nsName string, schemaName string, metadata *schema.Metadata, data []byte, commitSHA string) (schema.SchemaInfo, error)
	Get(ctx context.Context, namespace string, schemaName string, version int32) (*schema.Metadata, []byte, error)
	Delete(ctx context.Context, namespace string, schemaName string) error
	DeleteVersion(ctx context.Context, namespace string, schemaName string, version int32) error
	GetLatest(ctx context.Context, namespace string, schemaName string) (*schema.Metadata, []byte, error)
	GetMetadata(ctx context.Context, namespace, schemaName string) (*schema.Metadata, error)
	UpdateMetadata(ctx context.Context, namespace, schemaName string, meta *schema.Metadata) (*schema.Metadata, error)
	List(ctx context.Context, namespaceID string) ([]schema.Schema, error)
	ListVersions(ctx context.Context, namespaceID string, schemaName string) ([]int32, error)
	DetectSchemaChange(namespace string, schemaName string, fromVersion string, toVersion string, depth string) (*stencilv1beta1.SchemaChangedEvent, error)
}

type SearchService

type SearchService interface {
	Search(ctx context.Context, req *search.SearchRequest) (*search.SearchResponse, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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