chaparralv1connect

package
v0.0.0-...-8c72eba Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AccessServiceGetObjectVersionProcedure is the fully-qualified name of the AccessService's
	// GetObjectVersion RPC.
	AccessServiceGetObjectVersionProcedure = "/chaparral.v1.AccessService/GetObjectVersion"
	// AccessServiceGetObjectManifestProcedure is the fully-qualified name of the AccessService's
	// GetObjectManifest RPC.
	AccessServiceGetObjectManifestProcedure = "/chaparral.v1.AccessService/GetObjectManifest"
)

These constants are the fully-qualified names of the RPCs defined in this package. They're exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.

Note that these are different from the fully-qualified method names used by google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to reflection-formatted method names, remove the leading slash and convert the remaining slash to a period.

View Source
const (
	// CommitServiceCommitProcedure is the fully-qualified name of the CommitService's Commit RPC.
	CommitServiceCommitProcedure = "/chaparral.v1.CommitService/Commit"
	// CommitServiceNewUploaderProcedure is the fully-qualified name of the CommitService's NewUploader
	// RPC.
	CommitServiceNewUploaderProcedure = "/chaparral.v1.CommitService/NewUploader"
	// CommitServiceGetUploaderProcedure is the fully-qualified name of the CommitService's GetUploader
	// RPC.
	CommitServiceGetUploaderProcedure = "/chaparral.v1.CommitService/GetUploader"
	// CommitServiceListUploadersProcedure is the fully-qualified name of the CommitService's
	// ListUploaders RPC.
	CommitServiceListUploadersProcedure = "/chaparral.v1.CommitService/ListUploaders"
	// CommitServiceDeleteUploaderProcedure is the fully-qualified name of the CommitService's
	// DeleteUploader RPC.
	CommitServiceDeleteUploaderProcedure = "/chaparral.v1.CommitService/DeleteUploader"
	// CommitServiceDeleteObjectProcedure is the fully-qualified name of the CommitService's
	// DeleteObject RPC.
	CommitServiceDeleteObjectProcedure = "/chaparral.v1.CommitService/DeleteObject"
)

These constants are the fully-qualified names of the RPCs defined in this package. They're exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.

Note that these are different from the fully-qualified method names used by google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to reflection-formatted method names, remove the leading slash and convert the remaining slash to a period.

View Source
const (
	// AccessServiceName is the fully-qualified name of the AccessService service.
	AccessServiceName = "chaparral.v1.AccessService"
)
View Source
const (
	// CommitServiceName is the fully-qualified name of the CommitService service.
	CommitServiceName = "chaparral.v1.CommitService"
)

Variables

This section is empty.

Functions

func NewAccessServiceHandler

func NewAccessServiceHandler(svc AccessServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler)

NewAccessServiceHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.

By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.

func NewCommitServiceHandler

func NewCommitServiceHandler(svc CommitServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler)

NewCommitServiceHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.

By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.

Types

type AccessServiceClient

type AccessServiceClient interface {
	// GetObjectVersion returns details about the logical state of an OCFL object
	// version.
	GetObjectVersion(context.Context, *connect_go.Request[v1.GetObjectVersionRequest]) (*connect_go.Response[v1.GetObjectVersionResponse], error)
	// GetObjectManifest returns digests, sizes, and fixity information for all
	// content associated with an object across all its versions.
	GetObjectManifest(context.Context, *connect_go.Request[v1.GetObjectManifestRequest]) (*connect_go.Response[v1.GetObjectManifestResponse], error)
}

AccessServiceClient is a client for the chaparral.v1.AccessService service.

func NewAccessServiceClient

func NewAccessServiceClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) AccessServiceClient

NewAccessServiceClient constructs a client for the chaparral.v1.AccessService service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.

The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).

type AccessServiceHandler

type AccessServiceHandler interface {
	// GetObjectVersion returns details about the logical state of an OCFL object
	// version.
	GetObjectVersion(context.Context, *connect_go.Request[v1.GetObjectVersionRequest]) (*connect_go.Response[v1.GetObjectVersionResponse], error)
	// GetObjectManifest returns digests, sizes, and fixity information for all
	// content associated with an object across all its versions.
	GetObjectManifest(context.Context, *connect_go.Request[v1.GetObjectManifestRequest]) (*connect_go.Response[v1.GetObjectManifestResponse], error)
}

AccessServiceHandler is an implementation of the chaparral.v1.AccessService service.

type CommitServiceClient

type CommitServiceClient interface {
	// Commit creates or updates individual OCFL objects
	Commit(context.Context, *connect_go.Request[v1.CommitRequest]) (*connect_go.Response[v1.CommitResponse], error)
	// NewUploader creates a new uploader where content can be uploaded before
	// committing it to an object..
	NewUploader(context.Context, *connect_go.Request[v1.NewUploaderRequest]) (*connect_go.Response[v1.NewUploaderResponse], error)
	// GetUploader returns details for a specific uploader
	GetUploader(context.Context, *connect_go.Request[v1.GetUploaderRequest]) (*connect_go.Response[v1.GetUploaderResponse], error)
	// ListUploaders returns a list of uploaders.
	ListUploaders(context.Context, *connect_go.Request[v1.ListUploadersRequest]) (*connect_go.Response[v1.ListUploadersResponse], error)
	// DeleteUploader deletes an uploader and files uploaded to it.
	DeleteUploader(context.Context, *connect_go.Request[v1.DeleteUploaderRequest]) (*connect_go.Response[v1.DeleteUploaderResponse], error)
	// DeleteObject permanently deletes an existing OCFL object.
	DeleteObject(context.Context, *connect_go.Request[v1.DeleteObjectRequest]) (*connect_go.Response[v1.DeleteObjectResponse], error)
}

CommitServiceClient is a client for the chaparral.v1.CommitService service.

func NewCommitServiceClient

func NewCommitServiceClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) CommitServiceClient

NewCommitServiceClient constructs a client for the chaparral.v1.CommitService service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.

The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).

type CommitServiceHandler

type CommitServiceHandler interface {
	// Commit creates or updates individual OCFL objects
	Commit(context.Context, *connect_go.Request[v1.CommitRequest]) (*connect_go.Response[v1.CommitResponse], error)
	// NewUploader creates a new uploader where content can be uploaded before
	// committing it to an object..
	NewUploader(context.Context, *connect_go.Request[v1.NewUploaderRequest]) (*connect_go.Response[v1.NewUploaderResponse], error)
	// GetUploader returns details for a specific uploader
	GetUploader(context.Context, *connect_go.Request[v1.GetUploaderRequest]) (*connect_go.Response[v1.GetUploaderResponse], error)
	// ListUploaders returns a list of uploaders.
	ListUploaders(context.Context, *connect_go.Request[v1.ListUploadersRequest]) (*connect_go.Response[v1.ListUploadersResponse], error)
	// DeleteUploader deletes an uploader and files uploaded to it.
	DeleteUploader(context.Context, *connect_go.Request[v1.DeleteUploaderRequest]) (*connect_go.Response[v1.DeleteUploaderResponse], error)
	// DeleteObject permanently deletes an existing OCFL object.
	DeleteObject(context.Context, *connect_go.Request[v1.DeleteObjectRequest]) (*connect_go.Response[v1.DeleteObjectResponse], error)
}

CommitServiceHandler is an implementation of the chaparral.v1.CommitService service.

type UnimplementedAccessServiceHandler

type UnimplementedAccessServiceHandler struct{}

UnimplementedAccessServiceHandler returns CodeUnimplemented from all methods.

type UnimplementedCommitServiceHandler

type UnimplementedCommitServiceHandler struct{}

UnimplementedCommitServiceHandler returns CodeUnimplemented from all methods.

Jump to

Keyboard shortcuts

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