Documentation ¶
Overview ¶
Package assetsv1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterAssetsAPIHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterAssetsAPIHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AssetsAPIClient) error
- func RegisterAssetsAPIHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterAssetsAPIHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AssetsAPIServer) error
- func RegisterAssetsAPIServer(s grpc.ServiceRegistrar, srv AssetsAPIServer)
- type AssetsAPIClient
- type AssetsAPIServer
- type FetchRequest
- func (*FetchRequest) Descriptor() ([]byte, []int)deprecated
- func (*FetchRequest) ProtoMessage()
- func (x *FetchRequest) ProtoReflect() protoreflect.Message
- func (x *FetchRequest) Reset()
- func (x *FetchRequest) String() string
- func (m *FetchRequest) Validate() error
- func (m *FetchRequest) ValidateAll() error
- type FetchRequestMultiError
- type FetchRequestValidationError
- func (e FetchRequestValidationError) Cause() error
- func (e FetchRequestValidationError) Error() string
- func (e FetchRequestValidationError) ErrorName() string
- func (e FetchRequestValidationError) Field() string
- func (e FetchRequestValidationError) Key() bool
- func (e FetchRequestValidationError) Reason() string
- type FetchResponse
- func (*FetchResponse) Descriptor() ([]byte, []int)deprecated
- func (*FetchResponse) ProtoMessage()
- func (x *FetchResponse) ProtoReflect() protoreflect.Message
- func (x *FetchResponse) Reset()
- func (x *FetchResponse) String() string
- func (m *FetchResponse) Validate() error
- func (m *FetchResponse) ValidateAll() error
- type FetchResponseMultiError
- type FetchResponseValidationError
- func (e FetchResponseValidationError) Cause() error
- func (e FetchResponseValidationError) Error() string
- func (e FetchResponseValidationError) ErrorName() string
- func (e FetchResponseValidationError) Field() string
- func (e FetchResponseValidationError) Key() bool
- func (e FetchResponseValidationError) Reason() string
- type UnimplementedAssetsAPIServer
- type UnsafeAssetsAPIServer
Constants ¶
const (
AssetsAPI_Fetch_FullMethodName = "/datalift.assets.v1.AssetsAPI/Fetch"
)
Variables ¶
var AssetsAPI_ServiceDesc = grpc.ServiceDesc{ ServiceName: "datalift.assets.v1.AssetsAPI", HandlerType: (*AssetsAPIServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Fetch", Handler: _AssetsAPI_Fetch_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "assets/v1/assets.proto", }
AssetsAPI_ServiceDesc is the grpc.ServiceDesc for AssetsAPI service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_assets_v1_assets_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAssetsAPIHandler ¶
func RegisterAssetsAPIHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterAssetsAPIHandler registers the http handlers for service AssetsAPI to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterAssetsAPIHandlerClient ¶
func RegisterAssetsAPIHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AssetsAPIClient) error
RegisterAssetsAPIHandlerClient registers the http handlers for service AssetsAPI to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AssetsAPIClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AssetsAPIClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "AssetsAPIClient" to call the correct interceptors.
func RegisterAssetsAPIHandlerFromEndpoint ¶
func RegisterAssetsAPIHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterAssetsAPIHandlerFromEndpoint is same as RegisterAssetsAPIHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterAssetsAPIHandlerServer ¶
func RegisterAssetsAPIHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AssetsAPIServer) error
RegisterAssetsAPIHandlerServer registers the http handlers for service AssetsAPI to "mux". UnaryRPC :call AssetsAPIServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAssetsAPIHandlerFromEndpoint instead.
func RegisterAssetsAPIServer ¶
func RegisterAssetsAPIServer(s grpc.ServiceRegistrar, srv AssetsAPIServer)
Types ¶
type AssetsAPIClient ¶
type AssetsAPIClient interface { // Fetch is a simple endpoint that is used to execute middleware (e.g. authentication) before serving an asset. Fetch(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*FetchResponse, error) }
AssetsAPIClient is the client API for AssetsAPI service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewAssetsAPIClient ¶
func NewAssetsAPIClient(cc grpc.ClientConnInterface) AssetsAPIClient
type AssetsAPIServer ¶
type AssetsAPIServer interface { // Fetch is a simple endpoint that is used to execute middleware (e.g. authentication) before serving an asset. Fetch(context.Context, *FetchRequest) (*FetchResponse, error) }
AssetsAPIServer is the server API for AssetsAPI service. All implementations should embed UnimplementedAssetsAPIServer for forward compatibility
type FetchRequest ¶
type FetchRequest struct {
// contains filtered or unexported fields
}
func (*FetchRequest) Descriptor
deprecated
func (*FetchRequest) Descriptor() ([]byte, []int)
Deprecated: Use FetchRequest.ProtoReflect.Descriptor instead.
func (*FetchRequest) ProtoMessage ¶
func (*FetchRequest) ProtoMessage()
func (*FetchRequest) ProtoReflect ¶
func (x *FetchRequest) ProtoReflect() protoreflect.Message
func (*FetchRequest) Reset ¶
func (x *FetchRequest) Reset()
func (*FetchRequest) String ¶
func (x *FetchRequest) String() string
func (*FetchRequest) Validate ¶
func (m *FetchRequest) Validate() error
Validate checks the field values on FetchRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*FetchRequest) ValidateAll ¶
func (m *FetchRequest) ValidateAll() error
ValidateAll checks the field values on FetchRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in FetchRequestMultiError, or nil if none found.
type FetchRequestMultiError ¶
type FetchRequestMultiError []error
FetchRequestMultiError is an error wrapping multiple validation errors returned by FetchRequest.ValidateAll() if the designated constraints aren't met.
func (FetchRequestMultiError) AllErrors ¶
func (m FetchRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (FetchRequestMultiError) Error ¶
func (m FetchRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type FetchRequestValidationError ¶
type FetchRequestValidationError struct {
// contains filtered or unexported fields
}
FetchRequestValidationError is the validation error returned by FetchRequest.Validate if the designated constraints aren't met.
func (FetchRequestValidationError) Cause ¶
func (e FetchRequestValidationError) Cause() error
Cause function returns cause value.
func (FetchRequestValidationError) Error ¶
func (e FetchRequestValidationError) Error() string
Error satisfies the builtin error interface
func (FetchRequestValidationError) ErrorName ¶
func (e FetchRequestValidationError) ErrorName() string
ErrorName returns error name.
func (FetchRequestValidationError) Field ¶
func (e FetchRequestValidationError) Field() string
Field function returns field value.
func (FetchRequestValidationError) Key ¶
func (e FetchRequestValidationError) Key() bool
Key function returns key value.
func (FetchRequestValidationError) Reason ¶
func (e FetchRequestValidationError) Reason() string
Reason function returns reason value.
type FetchResponse ¶
type FetchResponse struct {
// contains filtered or unexported fields
}
func (*FetchResponse) Descriptor
deprecated
func (*FetchResponse) Descriptor() ([]byte, []int)
Deprecated: Use FetchResponse.ProtoReflect.Descriptor instead.
func (*FetchResponse) ProtoMessage ¶
func (*FetchResponse) ProtoMessage()
func (*FetchResponse) ProtoReflect ¶
func (x *FetchResponse) ProtoReflect() protoreflect.Message
func (*FetchResponse) Reset ¶
func (x *FetchResponse) Reset()
func (*FetchResponse) String ¶
func (x *FetchResponse) String() string
func (*FetchResponse) Validate ¶
func (m *FetchResponse) Validate() error
Validate checks the field values on FetchResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*FetchResponse) ValidateAll ¶
func (m *FetchResponse) ValidateAll() error
ValidateAll checks the field values on FetchResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in FetchResponseMultiError, or nil if none found.
type FetchResponseMultiError ¶
type FetchResponseMultiError []error
FetchResponseMultiError is an error wrapping multiple validation errors returned by FetchResponse.ValidateAll() if the designated constraints aren't met.
func (FetchResponseMultiError) AllErrors ¶
func (m FetchResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (FetchResponseMultiError) Error ¶
func (m FetchResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type FetchResponseValidationError ¶
type FetchResponseValidationError struct {
// contains filtered or unexported fields
}
FetchResponseValidationError is the validation error returned by FetchResponse.Validate if the designated constraints aren't met.
func (FetchResponseValidationError) Cause ¶
func (e FetchResponseValidationError) Cause() error
Cause function returns cause value.
func (FetchResponseValidationError) Error ¶
func (e FetchResponseValidationError) Error() string
Error satisfies the builtin error interface
func (FetchResponseValidationError) ErrorName ¶
func (e FetchResponseValidationError) ErrorName() string
ErrorName returns error name.
func (FetchResponseValidationError) Field ¶
func (e FetchResponseValidationError) Field() string
Field function returns field value.
func (FetchResponseValidationError) Key ¶
func (e FetchResponseValidationError) Key() bool
Key function returns key value.
func (FetchResponseValidationError) Reason ¶
func (e FetchResponseValidationError) Reason() string
Reason function returns reason value.
type UnimplementedAssetsAPIServer ¶
type UnimplementedAssetsAPIServer struct { }
UnimplementedAssetsAPIServer should be embedded to have forward compatible implementations.
func (UnimplementedAssetsAPIServer) Fetch ¶
func (UnimplementedAssetsAPIServer) Fetch(context.Context, *FetchRequest) (*FetchResponse, error)
type UnsafeAssetsAPIServer ¶
type UnsafeAssetsAPIServer interface {
// contains filtered or unexported methods
}
UnsafeAssetsAPIServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AssetsAPIServer will result in compilation errors.