v2

package
v2.0.0-staffbase-rc16 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

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

func (*Event) GetHttpRequest

func (m *Event) GetHttpRequest() *HTTPRequest

func (*Event) GetUpload

func (m *Event) GetUpload() *FileInfo

func (*Event) ProtoMessage

func (*Event) ProtoMessage()

func (*Event) Reset

func (m *Event) Reset()

func (*Event) String

func (m *Event) String() string

func (*Event) XXX_DiscardUnknown

func (m *Event) XXX_DiscardUnknown()

func (*Event) XXX_Marshal

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

func (*Event) XXX_Merge

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

func (*Event) XXX_Size

func (m *Event) XXX_Size() int

func (*Event) XXX_Unmarshal

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

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

func (*FileInfo) GetId

func (m *FileInfo) GetId() string

func (*FileInfo) GetIsFinal

func (m *FileInfo) GetIsFinal() bool

func (*FileInfo) GetIsPartial

func (m *FileInfo) GetIsPartial() bool

func (*FileInfo) GetMetaData

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

func (*FileInfo) GetOffset

func (m *FileInfo) GetOffset() int64

func (*FileInfo) GetPartialUploads

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

func (*FileInfo) GetSize

func (m *FileInfo) GetSize() int64

func (*FileInfo) GetSizeIsDeferred

func (m *FileInfo) GetSizeIsDeferred() bool

func (*FileInfo) GetStorage

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

func (*FileInfo) ProtoMessage

func (*FileInfo) ProtoMessage()

func (*FileInfo) Reset

func (m *FileInfo) Reset()

func (*FileInfo) String

func (m *FileInfo) String() string

func (*FileInfo) XXX_DiscardUnknown

func (m *FileInfo) XXX_DiscardUnknown()

func (*FileInfo) XXX_Marshal

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

func (*FileInfo) XXX_Merge

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

func (*FileInfo) XXX_Size

func (m *FileInfo) XXX_Size() int

func (*FileInfo) XXX_Unmarshal

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

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.

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

Jump to

Keyboard shortcuts

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