v2

package
v0.0.0-...-cbb8a25 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_cmd_tusd_cli_hooks_proto_v2_hook_proto protoreflect.FileDescriptor
View Source
var HookService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "v2.HookService",
	HandlerType: (*HookServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Send",
			Handler:    _HookService_Send_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "cmd/tusd/cli/hooks/proto/v2/hook.proto",
}

HookService_ServiceDesc is the grpc.ServiceDesc for HookService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterHookServiceServer

func RegisterHookServiceServer(s grpc.ServiceRegistrar, srv HookServiceServer)

Types

type HTTPRequest

type HTTPRequest struct {

	// Method is the HTTP method, e.g. POST or PATCH
	Method string `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"`
	// URI is the full HTTP request URI, e.g. /files/fooo
	Uri string `protobuf:"bytes,2,opt,name=uri,proto3" json:"uri,omitempty"`
	// RemoteAddr contains the network address that sent the request
	RemoteAddr string `protobuf:"bytes,3,opt,name=remoteAddr,proto3" json:"remoteAddr,omitempty"`
	// BearerAuth contains the HTTP Authorization header value
	BearerAuth string `protobuf:"bytes,4,opt,name=bearerAuth,proto3" json:"bearerAuth,omitempty"`
	// contains filtered or unexported fields
}

func (*HTTPRequest) Descriptor deprecated

func (*HTTPRequest) Descriptor() ([]byte, []int)

Deprecated: Use HTTPRequest.ProtoReflect.Descriptor instead.

func (*HTTPRequest) GetBearerAuth

func (x *HTTPRequest) GetBearerAuth() string

func (*HTTPRequest) GetMethod

func (x *HTTPRequest) GetMethod() string

func (*HTTPRequest) GetRemoteAddr

func (x *HTTPRequest) GetRemoteAddr() string

func (*HTTPRequest) GetUri

func (x *HTTPRequest) GetUri() string

func (*HTTPRequest) ProtoMessage

func (*HTTPRequest) ProtoMessage()

func (*HTTPRequest) ProtoReflect

func (x *HTTPRequest) ProtoReflect() protoreflect.Message

func (*HTTPRequest) Reset

func (x *HTTPRequest) Reset()

func (*HTTPRequest) String

func (x *HTTPRequest) String() string

type Hook

type Hook struct {

	// Upload contains information about the upload that caused this hook
	// to be fired.
	Upload *Upload `protobuf:"bytes,1,opt,name=upload,proto3" json:"upload,omitempty"`
	// HTTPRequest contains details about the HTTP request that reached
	// tusd.
	HttpRequest *HTTPRequest `protobuf:"bytes,2,opt,name=httpRequest,proto3" json:"httpRequest,omitempty"`
	// The hook name
	Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

Hook's data

func (*Hook) Descriptor deprecated

func (*Hook) Descriptor() ([]byte, []int)

Deprecated: Use Hook.ProtoReflect.Descriptor instead.

func (*Hook) GetHttpRequest

func (x *Hook) GetHttpRequest() *HTTPRequest

func (*Hook) GetName

func (x *Hook) GetName() string

func (*Hook) GetUpload

func (x *Hook) GetUpload() *Upload

func (*Hook) ProtoMessage

func (*Hook) ProtoMessage()

func (*Hook) ProtoReflect

func (x *Hook) ProtoReflect() protoreflect.Message

func (*Hook) Reset

func (x *Hook) Reset()

func (*Hook) String

func (x *Hook) String() string

type HookServiceClient

type HookServiceClient interface {
	// Sends a hook
	Send(ctx context.Context, in *SendRequest, opts ...grpc.CallOption) (*SendResponse, error)
}

HookServiceClient is the client API for HookService 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.

type HookServiceServer

type HookServiceServer interface {
	// Sends a hook
	Send(context.Context, *SendRequest) (*SendResponse, error)
	// contains filtered or unexported methods
}

HookServiceServer is the server API for HookService service. All implementations must embed UnimplementedHookServiceServer for forward compatibility

type SendRequest

type SendRequest struct {

	// The hook data
	Hook *Hook `protobuf:"bytes,1,opt,name=hook,proto3" json:"hook,omitempty"`
	// contains filtered or unexported fields
}

Request data to send hook

func (*SendRequest) Descriptor deprecated

func (*SendRequest) Descriptor() ([]byte, []int)

Deprecated: Use SendRequest.ProtoReflect.Descriptor instead.

func (*SendRequest) GetHook

func (x *SendRequest) GetHook() *Hook

func (*SendRequest) ProtoMessage

func (*SendRequest) ProtoMessage()

func (*SendRequest) ProtoReflect

func (x *SendRequest) ProtoReflect() protoreflect.Message

func (*SendRequest) Reset

func (x *SendRequest) Reset()

func (*SendRequest) String

func (x *SendRequest) String() string

type SendResponse

type SendResponse struct {

	// The response of the hook.
	Response *any1.Any `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"`
	// contains filtered or unexported fields
}

Response that contains data for sended hook

func (*SendResponse) Descriptor deprecated

func (*SendResponse) Descriptor() ([]byte, []int)

Deprecated: Use SendResponse.ProtoReflect.Descriptor instead.

func (*SendResponse) GetResponse

func (x *SendResponse) GetResponse() *any1.Any

func (*SendResponse) ProtoMessage

func (*SendResponse) ProtoMessage()

func (*SendResponse) ProtoReflect

func (x *SendResponse) ProtoReflect() protoreflect.Message

func (*SendResponse) Reset

func (x *SendResponse) Reset()

func (*SendResponse) String

func (x *SendResponse) String() string

type UnimplementedHookServiceServer

type UnimplementedHookServiceServer struct {
}

UnimplementedHookServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedHookServiceServer) Send

type UnsafeHookServiceServer

type UnsafeHookServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeHookServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to HookServiceServer will result in compilation errors.

type Upload

type Upload struct {

	// Unique integer identifier of the uploaded file
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Total file size in bytes specified in the NewUpload call
	Size int64 `protobuf:"varint,2,opt,name=Size,proto3" json:"Size,omitempty"`
	// Indicates whether the total file size is deferred until later
	SizeIsDeferred bool `protobuf:"varint,3,opt,name=SizeIsDeferred,proto3" json:"SizeIsDeferred,omitempty"`
	// Offset in bytes (zero-based)
	Offset   int64             `protobuf:"varint,4,opt,name=Offset,proto3" json:"Offset,omitempty"`
	MetaData map[string]string `` /* 157-byte string literal not displayed */
	// Indicates that this is a partial upload which will later be used to form
	// a final upload by concatenation. Partial uploads should not be processed
	// when they are finished since they are only incomplete chunks of files.
	IsPartial bool `protobuf:"varint,6,opt,name=isPartial,proto3" json:"isPartial,omitempty"`
	// Indicates that this is a final upload
	IsFinal bool `protobuf:"varint,7,opt,name=isFinal,proto3" json:"isFinal,omitempty"`
	// If the upload is a final one (see IsFinal) this will be a non-empty
	// ordered slice containing the ids of the uploads of which the final upload
	// will consist after concatenation.
	PartialUploads []string `protobuf:"bytes,8,rep,name=partialUploads,proto3" json:"partialUploads,omitempty"`
	// Storage contains information about where the data storage saves the upload,
	// for example a file path. The available values vary depending on what data
	// store is used. This map may also be nil.
	Storage map[string]string `` /* 155-byte string literal not displayed */
	// contains filtered or unexported fields
}

Uploaded data

func (*Upload) Descriptor deprecated

func (*Upload) Descriptor() ([]byte, []int)

Deprecated: Use Upload.ProtoReflect.Descriptor instead.

func (*Upload) GetId

func (x *Upload) GetId() string

func (*Upload) GetIsFinal

func (x *Upload) GetIsFinal() bool

func (*Upload) GetIsPartial

func (x *Upload) GetIsPartial() bool

func (*Upload) GetMetaData

func (x *Upload) GetMetaData() map[string]string

func (*Upload) GetOffset

func (x *Upload) GetOffset() int64

func (*Upload) GetPartialUploads

func (x *Upload) GetPartialUploads() []string

func (*Upload) GetSize

func (x *Upload) GetSize() int64

func (*Upload) GetSizeIsDeferred

func (x *Upload) GetSizeIsDeferred() bool

func (*Upload) GetStorage

func (x *Upload) GetStorage() map[string]string

func (*Upload) ProtoMessage

func (*Upload) ProtoMessage()

func (*Upload) ProtoReflect

func (x *Upload) ProtoReflect() protoreflect.Message

func (*Upload) Reset

func (x *Upload) Reset()

func (*Upload) String

func (x *Upload) String() string

Jump to

Keyboard shortcuts

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