Documentation ¶
Index ¶
- Constants
- type API
- func (s *API) Check(ctx context.Context, in *grpc_health_v1.HealthCheckRequest) (*grpc_health_v1.HealthCheckResponse, error)
- func (a *API) CheckCompatibility(ctx context.Context, req *stencilv1beta1.CheckCompatibilityRequest) (*stencilv1beta1.CheckCompatibilityResponse, error)
- func (a *API) CreateNamespace(ctx context.Context, in *stencilv1beta1.CreateNamespaceRequest) (*stencilv1beta1.CreateNamespaceResponse, error)
- func (a *API) CreateSchema(ctx context.Context, in *stencilv1beta1.CreateSchemaRequest) (*stencilv1beta1.CreateSchemaResponse, error)
- func (a *API) DeleteNamespace(ctx context.Context, in *stencilv1beta1.DeleteNamespaceRequest) (*stencilv1beta1.DeleteNamespaceResponse, error)
- func (a *API) DeleteSchema(ctx context.Context, in *stencilv1beta1.DeleteSchemaRequest) (*stencilv1beta1.DeleteSchemaResponse, error)
- func (a *API) DeleteVersion(ctx context.Context, in *stencilv1beta1.DeleteVersionRequest) (*stencilv1beta1.DeleteVersionResponse, error)
- func (a *API) DetectSchemaChange(writer http.ResponseWriter, request *http.Request, ...) error
- func (a *API) GetLatestSchema(ctx context.Context, in *stencilv1beta1.GetLatestSchemaRequest) (*stencilv1beta1.GetLatestSchemaResponse, error)
- func (a *API) GetNamespace(ctx context.Context, in *stencilv1beta1.GetNamespaceRequest) (*stencilv1beta1.GetNamespaceResponse, error)
- func (a *API) GetSchema(ctx context.Context, in *stencilv1beta1.GetSchemaRequest) (*stencilv1beta1.GetSchemaResponse, error)
- func (a *API) GetSchemaMetadata(ctx context.Context, in *stencilv1beta1.GetSchemaMetadataRequest) (*stencilv1beta1.GetSchemaMetadataResponse, error)
- func (a *API) HTTPCheckCompatibility(w http.ResponseWriter, req *http.Request, pathParams map[string]string) error
- func (a *API) HTTPGetSchema(w http.ResponseWriter, req *http.Request, pathParams map[string]string) (*schema.Metadata, []byte, error)
- func (a *API) HTTPLatestSchema(w http.ResponseWriter, req *http.Request, pathParams map[string]string) (*schema.Metadata, []byte, error)
- func (a *API) HTTPUpload(w http.ResponseWriter, req *http.Request, pathParams map[string]string) error
- func (a *API) ListNamespaces(ctx context.Context, in *stencilv1beta1.ListNamespacesRequest) (*stencilv1beta1.ListNamespacesResponse, error)
- func (a *API) ListSchemas(ctx context.Context, in *stencilv1beta1.ListSchemasRequest) (*stencilv1beta1.ListSchemasResponse, error)
- func (a *API) ListVersions(ctx context.Context, in *stencilv1beta1.ListVersionsRequest) (*stencilv1beta1.ListVersionsResponse, error)
- func (a *API) RegisterSchemaHandlers(mux *runtime.ServeMux, app *newrelic.Application)
- func (a *API) Search(ctx context.Context, in *stencilv1beta1.SearchRequest) (*stencilv1beta1.SearchResponse, error)
- func (a *API) UpdateNamespace(ctx context.Context, in *stencilv1beta1.UpdateNamespaceRequest) (*stencilv1beta1.UpdateNamespaceResponse, error)
- func (a *API) UpdateSchemaMetadata(ctx context.Context, in *stencilv1beta1.UpdateSchemaMetadataRequest) (*stencilv1beta1.UpdateSchemaMetadataResponse, error)
- type NamespaceService
- type SchemaService
- type SearchService
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 ¶
func (s *API) Check(ctx context.Context, in *grpc_health_v1.HealthCheckRequest) (*grpc_health_v1.HealthCheckResponse, error)
Check grpc health check
func (*API) CheckCompatibility ¶
func (a *API) CheckCompatibility(ctx context.Context, req *stencilv1beta1.CheckCompatibilityRequest) (*stencilv1beta1.CheckCompatibilityResponse, error)
func (*API) CreateNamespace ¶
func (a *API) CreateNamespace(ctx context.Context, in *stencilv1beta1.CreateNamespaceRequest) (*stencilv1beta1.CreateNamespaceResponse, error)
CreateNamespace handler for creating namespace
func (*API) CreateSchema ¶
func (a *API) CreateSchema(ctx context.Context, in *stencilv1beta1.CreateSchemaRequest) (*stencilv1beta1.CreateSchemaResponse, error)
func (*API) DeleteNamespace ¶
func (a *API) DeleteNamespace(ctx context.Context, in *stencilv1beta1.DeleteNamespaceRequest) (*stencilv1beta1.DeleteNamespaceResponse, error)
func (*API) DeleteSchema ¶
func (a *API) DeleteSchema(ctx context.Context, in *stencilv1beta1.DeleteSchemaRequest) (*stencilv1beta1.DeleteSchemaResponse, error)
func (*API) DeleteVersion ¶
func (a *API) DeleteVersion(ctx context.Context, in *stencilv1beta1.DeleteVersionRequest) (*stencilv1beta1.DeleteVersionResponse, error)
func (*API) DetectSchemaChange ¶ added in v0.8.5
func (*API) GetLatestSchema ¶
func (a *API) GetLatestSchema(ctx context.Context, in *stencilv1beta1.GetLatestSchemaRequest) (*stencilv1beta1.GetLatestSchemaResponse, error)
func (*API) GetNamespace ¶
func (a *API) GetNamespace(ctx context.Context, in *stencilv1beta1.GetNamespaceRequest) (*stencilv1beta1.GetNamespaceResponse, error)
func (*API) GetSchema ¶
func (a *API) GetSchema(ctx context.Context, in *stencilv1beta1.GetSchemaRequest) (*stencilv1beta1.GetSchemaResponse, error)
func (*API) GetSchemaMetadata ¶
func (a *API) GetSchemaMetadata(ctx context.Context, in *stencilv1beta1.GetSchemaMetadataRequest) (*stencilv1beta1.GetSchemaMetadataResponse, error)
func (*API) HTTPCheckCompatibility ¶
func (*API) HTTPGetSchema ¶
func (*API) HTTPLatestSchema ¶
func (*API) HTTPUpload ¶
func (*API) ListNamespaces ¶
func (a *API) ListNamespaces(ctx context.Context, in *stencilv1beta1.ListNamespacesRequest) (*stencilv1beta1.ListNamespacesResponse, error)
ListNamespaces handler for returning list of available namespaces
func (*API) ListSchemas ¶
func (a *API) ListSchemas(ctx context.Context, in *stencilv1beta1.ListSchemasRequest) (*stencilv1beta1.ListSchemasResponse, error)
func (*API) ListVersions ¶
func (a *API) ListVersions(ctx context.Context, in *stencilv1beta1.ListVersionsRequest) (*stencilv1beta1.ListVersionsResponse, error)
func (*API) RegisterSchemaHandlers ¶
func (a *API) RegisterSchemaHandlers(mux *runtime.ServeMux, app *newrelic.Application)
RegisterSchemaHandlers registers HTTP handlers for schema download
func (*API) Search ¶
func (a *API) Search(ctx context.Context, in *stencilv1beta1.SearchRequest) (*stencilv1beta1.SearchResponse, error)
func (*API) UpdateNamespace ¶
func (a *API) UpdateNamespace(ctx context.Context, in *stencilv1beta1.UpdateNamespaceRequest) (*stencilv1beta1.UpdateNamespaceResponse, error)
func (*API) UpdateSchemaMetadata ¶
func (a *API) UpdateSchemaMetadata(ctx context.Context, in *stencilv1beta1.UpdateSchemaMetadataRequest) (*stencilv1beta1.UpdateSchemaMetadataResponse, error)
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)
}
Click to show internal directories.
Click to hide internal directories.