v1

package
Version: v1.6.1 Latest Latest
Warning

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

Go to latest
Published: May 17, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

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) Descriptor() ([]byte, []int)

func (*Hook) GetHttpRequest

func (m *Hook) GetHttpRequest() *HTTPRequest

func (*Hook) GetName

func (m *Hook) GetName() string

func (*Hook) GetUpload

func (m *Hook) GetUpload() *Upload

func (*Hook) ProtoMessage

func (*Hook) ProtoMessage()

func (*Hook) Reset

func (m *Hook) Reset()

func (*Hook) String

func (m *Hook) String() string

func (*Hook) XXX_DiscardUnknown

func (m *Hook) XXX_DiscardUnknown()

func (*Hook) XXX_Marshal

func (m *Hook) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Hook) XXX_Merge

func (m *Hook) XXX_Merge(src proto.Message)

func (*Hook) XXX_Size

func (m *Hook) XXX_Size() int

func (*Hook) XXX_Unmarshal

func (m *Hook) XXX_Unmarshal(b []byte) error

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.

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

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) Descriptor() ([]byte, []int)

func (*Upload) GetId

func (m *Upload) GetId() string

func (*Upload) GetIsFinal

func (m *Upload) GetIsFinal() bool

func (*Upload) GetIsPartial

func (m *Upload) GetIsPartial() bool

func (*Upload) GetMetaData

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

func (*Upload) GetOffset

func (m *Upload) GetOffset() int64

func (*Upload) GetPartialUploads

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

func (*Upload) GetSize

func (m *Upload) GetSize() int64

func (*Upload) GetSizeIsDeferred

func (m *Upload) GetSizeIsDeferred() bool

func (*Upload) GetStorage

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

func (*Upload) ProtoMessage

func (*Upload) ProtoMessage()

func (*Upload) Reset

func (m *Upload) Reset()

func (*Upload) String

func (m *Upload) String() string

func (*Upload) XXX_DiscardUnknown

func (m *Upload) XXX_DiscardUnknown()

func (*Upload) XXX_Marshal

func (m *Upload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Upload) XXX_Merge

func (m *Upload) XXX_Merge(src proto.Message)

func (*Upload) XXX_Size

func (m *Upload) XXX_Size() int

func (*Upload) XXX_Unmarshal

func (m *Upload) XXX_Unmarshal(b []byte) error

Source Files

Jump to

Keyboard shortcuts

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