Documentation
¶
Index ¶
- func RegisterHookServiceServer(s *grpc.Server, srv HookServiceServer)
- type HTTPRequest
- func (*HTTPRequest) Descriptor() ([]byte, []int)
- func (m *HTTPRequest) GetMethod() string
- func (m *HTTPRequest) GetRemoteAddr() string
- func (m *HTTPRequest) GetUri() string
- func (*HTTPRequest) ProtoMessage()
- func (m *HTTPRequest) Reset()
- func (m *HTTPRequest) String() string
- func (m *HTTPRequest) XXX_DiscardUnknown()
- func (m *HTTPRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *HTTPRequest) XXX_Merge(src proto.Message)
- func (m *HTTPRequest) XXX_Size() int
- func (m *HTTPRequest) XXX_Unmarshal(b []byte) error
- type Hook
- func (*Hook) Descriptor() ([]byte, []int)
- func (m *Hook) GetHttpRequest() *HTTPRequest
- func (m *Hook) GetName() string
- func (m *Hook) GetUpload() *Upload
- func (*Hook) ProtoMessage()
- func (m *Hook) Reset()
- func (m *Hook) String() string
- func (m *Hook) XXX_DiscardUnknown()
- func (m *Hook) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Hook) XXX_Merge(src proto.Message)
- func (m *Hook) XXX_Size() int
- func (m *Hook) XXX_Unmarshal(b []byte) error
- type HookServiceClient
- type HookServiceServer
- type SendRequest
- func (*SendRequest) Descriptor() ([]byte, []int)
- func (m *SendRequest) GetHook() *Hook
- func (*SendRequest) ProtoMessage()
- func (m *SendRequest) Reset()
- func (m *SendRequest) String() string
- func (m *SendRequest) XXX_DiscardUnknown()
- func (m *SendRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SendRequest) XXX_Merge(src proto.Message)
- func (m *SendRequest) XXX_Size() int
- func (m *SendRequest) XXX_Unmarshal(b []byte) error
- type SendResponse
- func (*SendResponse) Descriptor() ([]byte, []int)
- func (m *SendResponse) GetResponse() *any.Any
- func (*SendResponse) ProtoMessage()
- func (m *SendResponse) Reset()
- func (m *SendResponse) String() string
- func (m *SendResponse) XXX_DiscardUnknown()
- func (m *SendResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SendResponse) XXX_Merge(src proto.Message)
- func (m *SendResponse) XXX_Size() int
- func (m *SendResponse) XXX_Unmarshal(b []byte) error
- type UnimplementedHookServiceServer
- type Upload
- func (*Upload) Descriptor() ([]byte, []int)
- func (m *Upload) GetId() string
- func (m *Upload) GetIsFinal() bool
- func (m *Upload) GetIsPartial() bool
- func (m *Upload) GetMetaData() map[string]string
- func (m *Upload) GetOffset() int64
- func (m *Upload) GetPartialUploads() []string
- func (m *Upload) GetSize() int64
- func (m *Upload) GetSizeIsDeferred() bool
- func (m *Upload) GetStorage() map[string]string
- func (*Upload) ProtoMessage()
- func (m *Upload) Reset()
- func (m *Upload) String() string
- func (m *Upload) XXX_DiscardUnknown()
- func (m *Upload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Upload) XXX_Merge(src proto.Message)
- func (m *Upload) XXX_Size() int
- func (m *Upload) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterHookServiceServer ¶
func RegisterHookServiceServer(s *grpc.Server, 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"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*HTTPRequest) Descriptor ¶
func (*HTTPRequest) Descriptor() ([]byte, []int)
func (*HTTPRequest) GetMethod ¶
func (m *HTTPRequest) GetMethod() string
func (*HTTPRequest) GetRemoteAddr ¶
func (m *HTTPRequest) GetRemoteAddr() string
func (*HTTPRequest) GetUri ¶
func (m *HTTPRequest) GetUri() string
func (*HTTPRequest) ProtoMessage ¶
func (*HTTPRequest) ProtoMessage()
func (*HTTPRequest) Reset ¶
func (m *HTTPRequest) Reset()
func (*HTTPRequest) String ¶
func (m *HTTPRequest) String() string
func (*HTTPRequest) XXX_DiscardUnknown ¶
func (m *HTTPRequest) XXX_DiscardUnknown()
func (*HTTPRequest) XXX_Marshal ¶
func (m *HTTPRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*HTTPRequest) XXX_Merge ¶
func (m *HTTPRequest) XXX_Merge(src proto.Message)
func (*HTTPRequest) XXX_Size ¶
func (m *HTTPRequest) XXX_Size() int
func (*HTTPRequest) XXX_Unmarshal ¶
func (m *HTTPRequest) XXX_Unmarshal(b []byte) error
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"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
Hook's data
func (*Hook) Descriptor ¶
func (*Hook) GetHttpRequest ¶
func (m *Hook) GetHttpRequest() *HTTPRequest
func (*Hook) ProtoMessage ¶
func (*Hook) ProtoMessage()
func (*Hook) XXX_DiscardUnknown ¶
func (m *Hook) XXX_DiscardUnknown()
func (*Hook) XXX_Unmarshal ¶
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://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewHookServiceClient ¶
func NewHookServiceClient(cc grpc.ClientConnInterface) HookServiceClient
type HookServiceServer ¶
type HookServiceServer interface {
// Sends a hook
Send(context.Context, *SendRequest) (*SendResponse, error)
}
HookServiceServer is the server API for HookService service.
type SendRequest ¶
type SendRequest struct {
// The hook data
Hook *Hook `protobuf:"bytes,1,opt,name=hook,proto3" json:"hook,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
Request data to send hook
func (*SendRequest) Descriptor ¶
func (*SendRequest) Descriptor() ([]byte, []int)
func (*SendRequest) GetHook ¶
func (m *SendRequest) GetHook() *Hook
func (*SendRequest) ProtoMessage ¶
func (*SendRequest) ProtoMessage()
func (*SendRequest) Reset ¶
func (m *SendRequest) Reset()
func (*SendRequest) String ¶
func (m *SendRequest) String() string
func (*SendRequest) XXX_DiscardUnknown ¶
func (m *SendRequest) XXX_DiscardUnknown()
func (*SendRequest) XXX_Marshal ¶
func (m *SendRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SendRequest) XXX_Merge ¶
func (m *SendRequest) XXX_Merge(src proto.Message)
func (*SendRequest) XXX_Size ¶
func (m *SendRequest) XXX_Size() int
func (*SendRequest) XXX_Unmarshal ¶
func (m *SendRequest) XXX_Unmarshal(b []byte) error
type SendResponse ¶
type SendResponse struct {
// The response of the hook.
Response *any.Any `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
Response that contains data for sended hook
func (*SendResponse) Descriptor ¶
func (*SendResponse) Descriptor() ([]byte, []int)
func (*SendResponse) GetResponse ¶
func (m *SendResponse) GetResponse() *any.Any
func (*SendResponse) ProtoMessage ¶
func (*SendResponse) ProtoMessage()
func (*SendResponse) Reset ¶
func (m *SendResponse) Reset()
func (*SendResponse) String ¶
func (m *SendResponse) String() string
func (*SendResponse) XXX_DiscardUnknown ¶
func (m *SendResponse) XXX_DiscardUnknown()
func (*SendResponse) XXX_Marshal ¶
func (m *SendResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SendResponse) XXX_Merge ¶
func (m *SendResponse) XXX_Merge(src proto.Message)
func (*SendResponse) XXX_Size ¶
func (m *SendResponse) XXX_Size() int
func (*SendResponse) XXX_Unmarshal ¶
func (m *SendResponse) XXX_Unmarshal(b []byte) error
type UnimplementedHookServiceServer ¶
type UnimplementedHookServiceServer struct {
}
UnimplementedHookServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedHookServiceServer) Send ¶
func (*UnimplementedHookServiceServer) Send(ctx context.Context, req *SendRequest) (*SendResponse, error)
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 */
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
Uploaded data
func (*Upload) Descriptor ¶
func (*Upload) GetIsFinal ¶
func (*Upload) GetIsPartial ¶
func (*Upload) GetMetaData ¶
func (*Upload) GetPartialUploads ¶
func (*Upload) GetSizeIsDeferred ¶
func (*Upload) GetStorage ¶
func (*Upload) ProtoMessage ¶
func (*Upload) ProtoMessage()
func (*Upload) XXX_DiscardUnknown ¶
func (m *Upload) XXX_DiscardUnknown()
func (*Upload) XXX_Marshal ¶
func (*Upload) XXX_Unmarshal ¶
Click to show internal directories.
Click to hide internal directories.