Documentation ¶
Index ¶
- func RegisterHookHandlerServer(s *grpc.Server, srv HookHandlerServer)
- type Event
- func (*Event) Descriptor() ([]byte, []int)
- func (m *Event) GetHttpRequest() *HTTPRequest
- func (m *Event) GetUpload() *FileInfo
- func (*Event) ProtoMessage()
- func (m *Event) Reset()
- func (m *Event) String() string
- func (m *Event) XXX_DiscardUnknown()
- func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Event) XXX_Merge(src proto.Message)
- func (m *Event) XXX_Size() int
- func (m *Event) XXX_Unmarshal(b []byte) error
- type FileInfo
- func (*FileInfo) Descriptor() ([]byte, []int)
- func (m *FileInfo) GetId() string
- func (m *FileInfo) GetIsFinal() bool
- func (m *FileInfo) GetIsPartial() bool
- func (m *FileInfo) GetMetaData() map[string]string
- func (m *FileInfo) GetOffset() int64
- func (m *FileInfo) GetPartialUploads() []string
- func (m *FileInfo) GetSize() int64
- func (m *FileInfo) GetSizeIsDeferred() bool
- func (m *FileInfo) GetStorage() map[string]string
- func (*FileInfo) ProtoMessage()
- func (m *FileInfo) Reset()
- func (m *FileInfo) String() string
- func (m *FileInfo) XXX_DiscardUnknown()
- func (m *FileInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *FileInfo) XXX_Merge(src proto.Message)
- func (m *FileInfo) XXX_Size() int
- func (m *FileInfo) XXX_Unmarshal(b []byte) error
- type HTTPRequest
- func (*HTTPRequest) Descriptor() ([]byte, []int)
- func (m *HTTPRequest) GetHeader() map[string]string
- 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 HTTPResponse
- func (*HTTPResponse) Descriptor() ([]byte, []int)
- func (m *HTTPResponse) GetBody() string
- func (m *HTTPResponse) GetHeaders() map[string]string
- func (m *HTTPResponse) GetStatusCode() int64
- func (*HTTPResponse) ProtoMessage()
- func (m *HTTPResponse) Reset()
- func (m *HTTPResponse) String() string
- func (m *HTTPResponse) XXX_DiscardUnknown()
- func (m *HTTPResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *HTTPResponse) XXX_Merge(src proto.Message)
- func (m *HTTPResponse) XXX_Size() int
- func (m *HTTPResponse) XXX_Unmarshal(b []byte) error
- type HookHandlerClient
- type HookHandlerServer
- type HookRequest
- func (*HookRequest) Descriptor() ([]byte, []int)
- func (m *HookRequest) GetEvent() *Event
- func (m *HookRequest) GetType() string
- func (*HookRequest) ProtoMessage()
- func (m *HookRequest) Reset()
- func (m *HookRequest) String() string
- func (m *HookRequest) XXX_DiscardUnknown()
- func (m *HookRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *HookRequest) XXX_Merge(src proto.Message)
- func (m *HookRequest) XXX_Size() int
- func (m *HookRequest) XXX_Unmarshal(b []byte) error
- type HookResponse
- func (*HookResponse) Descriptor() ([]byte, []int)
- func (m *HookResponse) GetHttpResponse() *HTTPResponse
- func (m *HookResponse) GetRejectUpload() bool
- func (m *HookResponse) GetStopUpload() bool
- func (*HookResponse) ProtoMessage()
- func (m *HookResponse) Reset()
- func (m *HookResponse) String() string
- func (m *HookResponse) XXX_DiscardUnknown()
- func (m *HookResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *HookResponse) XXX_Merge(src proto.Message)
- func (m *HookResponse) XXX_Size() int
- func (m *HookResponse) XXX_Unmarshal(b []byte) error
- type UnimplementedHookHandlerServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterHookHandlerServer ¶
func RegisterHookHandlerServer(s *grpc.Server, srv HookHandlerServer)
Types ¶
type Event ¶
type Event struct { Upload *FileInfo `protobuf:"bytes,1,opt,name=upload,proto3" json:"upload,omitempty"` HttpRequest *HTTPRequest `protobuf:"bytes,2,opt,name=httpRequest,proto3" json:"httpRequest,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Event) Descriptor ¶
func (*Event) GetHttpRequest ¶
func (m *Event) GetHttpRequest() *HTTPRequest
func (*Event) ProtoMessage ¶
func (*Event) ProtoMessage()
func (*Event) XXX_DiscardUnknown ¶
func (m *Event) XXX_DiscardUnknown()
func (*Event) XXX_Marshal ¶
func (*Event) XXX_Unmarshal ¶
type FileInfo ¶
type FileInfo 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:"-"` }
TODO: Keep consistent naming capitalization Uploaded data
func (*FileInfo) Descriptor ¶
func (*FileInfo) GetIsFinal ¶
func (*FileInfo) GetIsPartial ¶
func (*FileInfo) GetMetaData ¶
func (*FileInfo) GetPartialUploads ¶
func (*FileInfo) GetSizeIsDeferred ¶
func (*FileInfo) GetStorage ¶
func (*FileInfo) ProtoMessage ¶
func (*FileInfo) ProtoMessage()
func (*FileInfo) XXX_DiscardUnknown ¶
func (m *FileInfo) XXX_DiscardUnknown()
func (*FileInfo) XXX_Marshal ¶
func (*FileInfo) XXX_Unmarshal ¶
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"` Header map[string]string `` /* 153-byte string literal not displayed */ XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*HTTPRequest) Descriptor ¶
func (*HTTPRequest) Descriptor() ([]byte, []int)
func (*HTTPRequest) GetHeader ¶
func (m *HTTPRequest) GetHeader() map[string]string
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 HTTPResponse ¶
type HTTPResponse struct { StatusCode int64 `protobuf:"varint,1,opt,name=statusCode,proto3" json:"statusCode,omitempty"` Headers map[string]string `` /* 155-byte string literal not displayed */ Body string `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*HTTPResponse) Descriptor ¶
func (*HTTPResponse) Descriptor() ([]byte, []int)
func (*HTTPResponse) GetBody ¶
func (m *HTTPResponse) GetBody() string
func (*HTTPResponse) GetHeaders ¶
func (m *HTTPResponse) GetHeaders() map[string]string
func (*HTTPResponse) GetStatusCode ¶
func (m *HTTPResponse) GetStatusCode() int64
func (*HTTPResponse) ProtoMessage ¶
func (*HTTPResponse) ProtoMessage()
func (*HTTPResponse) Reset ¶
func (m *HTTPResponse) Reset()
func (*HTTPResponse) String ¶
func (m *HTTPResponse) String() string
func (*HTTPResponse) XXX_DiscardUnknown ¶
func (m *HTTPResponse) XXX_DiscardUnknown()
func (*HTTPResponse) XXX_Marshal ¶
func (m *HTTPResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*HTTPResponse) XXX_Merge ¶
func (m *HTTPResponse) XXX_Merge(src proto.Message)
func (*HTTPResponse) XXX_Size ¶
func (m *HTTPResponse) XXX_Size() int
func (*HTTPResponse) XXX_Unmarshal ¶
func (m *HTTPResponse) XXX_Unmarshal(b []byte) error
type HookHandlerClient ¶
type HookHandlerClient interface { // Sends a hook InvokeHook(ctx context.Context, in *HookRequest, opts ...grpc.CallOption) (*HookResponse, error) }
HookHandlerClient is the client API for HookHandler service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewHookHandlerClient ¶
func NewHookHandlerClient(cc grpc.ClientConnInterface) HookHandlerClient
type HookHandlerServer ¶
type HookHandlerServer interface { // Sends a hook InvokeHook(context.Context, *HookRequest) (*HookResponse, error) }
HookHandlerServer is the server API for HookHandler service.
type HookRequest ¶
type HookRequest struct { Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` Event *Event `protobuf:"bytes,2,opt,name=event,proto3" json:"event,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Hook's data
func (*HookRequest) Descriptor ¶
func (*HookRequest) Descriptor() ([]byte, []int)
func (*HookRequest) GetEvent ¶
func (m *HookRequest) GetEvent() *Event
func (*HookRequest) GetType ¶
func (m *HookRequest) GetType() string
func (*HookRequest) ProtoMessage ¶
func (*HookRequest) ProtoMessage()
func (*HookRequest) Reset ¶
func (m *HookRequest) Reset()
func (*HookRequest) String ¶
func (m *HookRequest) String() string
func (*HookRequest) XXX_DiscardUnknown ¶
func (m *HookRequest) XXX_DiscardUnknown()
func (*HookRequest) XXX_Marshal ¶
func (m *HookRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*HookRequest) XXX_Merge ¶
func (m *HookRequest) XXX_Merge(src proto.Message)
func (*HookRequest) XXX_Size ¶
func (m *HookRequest) XXX_Size() int
func (*HookRequest) XXX_Unmarshal ¶
func (m *HookRequest) XXX_Unmarshal(b []byte) error
type HookResponse ¶
type HookResponse struct { HttpResponse *HTTPResponse `protobuf:"bytes,1,opt,name=httpResponse,proto3" json:"httpResponse,omitempty"` RejectUpload bool `protobuf:"varint,2,opt,name=rejectUpload,proto3" json:"rejectUpload,omitempty"` StopUpload bool `protobuf:"varint,3,opt,name=stopUpload,proto3" json:"stopUpload,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*HookResponse) Descriptor ¶
func (*HookResponse) Descriptor() ([]byte, []int)
func (*HookResponse) GetHttpResponse ¶
func (m *HookResponse) GetHttpResponse() *HTTPResponse
func (*HookResponse) GetRejectUpload ¶
func (m *HookResponse) GetRejectUpload() bool
func (*HookResponse) GetStopUpload ¶
func (m *HookResponse) GetStopUpload() bool
func (*HookResponse) ProtoMessage ¶
func (*HookResponse) ProtoMessage()
func (*HookResponse) Reset ¶
func (m *HookResponse) Reset()
func (*HookResponse) String ¶
func (m *HookResponse) String() string
func (*HookResponse) XXX_DiscardUnknown ¶
func (m *HookResponse) XXX_DiscardUnknown()
func (*HookResponse) XXX_Marshal ¶
func (m *HookResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*HookResponse) XXX_Merge ¶
func (m *HookResponse) XXX_Merge(src proto.Message)
func (*HookResponse) XXX_Size ¶
func (m *HookResponse) XXX_Size() int
func (*HookResponse) XXX_Unmarshal ¶
func (m *HookResponse) XXX_Unmarshal(b []byte) error
type UnimplementedHookHandlerServer ¶
type UnimplementedHookHandlerServer struct { }
UnimplementedHookHandlerServer can be embedded to have forward compatible implementations.
func (*UnimplementedHookHandlerServer) InvokeHook ¶
func (*UnimplementedHookHandlerServer) InvokeHook(ctx context.Context, req *HookRequest) (*HookResponse, error)
Click to show internal directories.
Click to hide internal directories.