commands

package
v0.1.32 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2022 License: AGPL-3.0 Imports: 11 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrorFormData = errors.New("invalid form data")

Functions

This section is empty.

Types

type BodyChunk

type BodyChunk struct {
	Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
	Body []byte `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"`
	Eof  bool   `protobuf:"varint,3,opt,name=eof,proto3" json:"eof,omitempty"`
	// contains filtered or unexported fields
}

func (*BodyChunk) Descriptor deprecated

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

Deprecated: Use BodyChunk.ProtoReflect.Descriptor instead.

func (*BodyChunk) GetBody

func (x *BodyChunk) GetBody() []byte

func (*BodyChunk) GetEof

func (x *BodyChunk) GetEof() bool

func (*BodyChunk) GetUuid

func (x *BodyChunk) GetUuid() string

func (*BodyChunk) ProtoMessage

func (*BodyChunk) ProtoMessage()

func (*BodyChunk) ProtoReflect

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

func (*BodyChunk) Reset

func (x *BodyChunk) Reset()

func (*BodyChunk) String

func (x *BodyChunk) String() string

type ClientConnect

type ClientConnect struct {
	Password string `protobuf:"bytes,1,opt,name=password,proto3" json:"password,omitempty"`
	Version  string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
	// contains filtered or unexported fields
}

func (*ClientConnect) Descriptor deprecated

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

Deprecated: Use ClientConnect.ProtoReflect.Descriptor instead.

func (*ClientConnect) GetPassword

func (x *ClientConnect) GetPassword() string

func (*ClientConnect) GetVersion

func (x *ClientConnect) GetVersion() string

func (*ClientConnect) ProtoMessage

func (*ClientConnect) ProtoMessage()

func (*ClientConnect) ProtoReflect

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

func (*ClientConnect) Reset

func (x *ClientConnect) Reset()

func (*ClientConnect) String

func (x *ClientConnect) String() string
type Cookie struct {
	Name     string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Value    string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	Path     string `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"`
	Domain   string `protobuf:"bytes,4,opt,name=domain,proto3" json:"domain,omitempty"`
	Expires  int64  `protobuf:"varint,5,opt,name=expires,proto3" json:"expires,omitempty"`
	MaxAge   int32  `protobuf:"varint,6,opt,name=max_age,json=maxAge,proto3" json:"max_age,omitempty"`
	Secure   bool   `protobuf:"varint,7,opt,name=secure,proto3" json:"secure,omitempty"`
	HttpOnly bool   `protobuf:"varint,8,opt,name=http_only,json=httpOnly,proto3" json:"http_only,omitempty"`
	// contains filtered or unexported fields
}

func (*Cookie) Descriptor deprecated

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

Deprecated: Use Cookie.ProtoReflect.Descriptor instead.

func (*Cookie) GetDomain

func (x *Cookie) GetDomain() string

func (*Cookie) GetExpires

func (x *Cookie) GetExpires() int64

func (*Cookie) GetHttpOnly

func (x *Cookie) GetHttpOnly() bool

func (*Cookie) GetMaxAge

func (x *Cookie) GetMaxAge() int32

func (*Cookie) GetName

func (x *Cookie) GetName() string

func (*Cookie) GetPath

func (x *Cookie) GetPath() string

func (*Cookie) GetSecure

func (x *Cookie) GetSecure() bool

func (*Cookie) GetValue

func (x *Cookie) GetValue() string

func (*Cookie) ProtoMessage

func (*Cookie) ProtoMessage()

func (*Cookie) ProtoReflect

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

func (*Cookie) Reset

func (x *Cookie) Reset()

func (*Cookie) String

func (x *Cookie) String() string

type Error

type Error struct {
	Code    int32  `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*Error) Descriptor deprecated

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

Deprecated: Use Error.ProtoReflect.Descriptor instead.

func (*Error) GetCode

func (x *Error) GetCode() int32

func (*Error) GetMessage

func (x *Error) GetMessage() string

func (*Error) ProtoMessage

func (*Error) ProtoMessage()

func (*Error) ProtoReflect

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

func (*Error) Reset

func (x *Error) Reset()

func (*Error) String

func (x *Error) String() string
type Header struct {
	Key   string   `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Value []string `protobuf:"bytes,2,rep,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*Header) Descriptor deprecated

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

Deprecated: Use Header.ProtoReflect.Descriptor instead.

func (*Header) GetKey

func (x *Header) GetKey() string

func (*Header) GetValue

func (x *Header) GetValue() []string

func (*Header) ProtoMessage

func (*Header) ProtoMessage()

func (*Header) ProtoReflect

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

func (*Header) Reset

func (x *Header) Reset()

func (*Header) String

func (x *Header) String() string

type HttpRequest

type HttpRequest struct {
	Uuid          string    `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
	Proto         string    `protobuf:"bytes,2,opt,name=proto,proto3" json:"proto,omitempty"`
	Method        string    `protobuf:"bytes,3,opt,name=method,proto3" json:"method,omitempty"`
	Uri           string    `protobuf:"bytes,4,opt,name=uri,proto3" json:"uri,omitempty"`
	ContentLength int64     `protobuf:"varint,5,opt,name=content_length,json=contentLength,proto3" json:"content_length,omitempty"`
	Cookies       []*Cookie `protobuf:"bytes,6,rep,name=cookies,proto3" json:"cookies,omitempty"`
	Header        []*Header `protobuf:"bytes,7,rep,name=header,proto3" json:"header,omitempty"`
	RemoteAddr    string    `protobuf:"bytes,8,opt,name=remote_addr,json=remoteAddr,proto3" json:"remote_addr,omitempty"`
	ErrorCode     int64     `protobuf:"varint,9,opt,name=error_code,json=errorCode,proto3" json:"error_code,omitempty"`
	// contains filtered or unexported fields
}

func (*HttpRequest) BasicAuth

func (x *HttpRequest) BasicAuth() (username, password string, ok bool)

func (*HttpRequest) CheckBasicAuth

func (x *HttpRequest) CheckBasicAuth(login, pass string) bool

func (*HttpRequest) Descriptor deprecated

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

Deprecated: Use HttpRequest.ProtoReflect.Descriptor instead.

func (*HttpRequest) GetContentLength

func (x *HttpRequest) GetContentLength() int64

func (*HttpRequest) GetContentType

func (x *HttpRequest) GetContentType() string

func (*HttpRequest) GetCookies

func (x *HttpRequest) GetCookies() []*Cookie

func (*HttpRequest) GetErrorCode

func (x *HttpRequest) GetErrorCode() int64

func (*HttpRequest) GetHeader

func (x *HttpRequest) GetHeader() []*Header

func (*HttpRequest) GetHeaderValue

func (x *HttpRequest) GetHeaderValue(k string) string

func (*HttpRequest) GetMethod

func (x *HttpRequest) GetMethod() string

func (*HttpRequest) GetProto

func (x *HttpRequest) GetProto() string

func (*HttpRequest) GetRemoteAddr

func (x *HttpRequest) GetRemoteAddr() string

func (*HttpRequest) GetUri

func (x *HttpRequest) GetUri() string

func (*HttpRequest) GetUuid

func (x *HttpRequest) GetUuid() string

func (*HttpRequest) IsBrowserRequest

func (x *HttpRequest) IsBrowserRequest() bool

func (*HttpRequest) IsFormData

func (x *HttpRequest) IsFormData() (boundary string, ok bool)

func (*HttpRequest) IsFormUrlencoded

func (x *HttpRequest) IsFormUrlencoded() bool

func (*HttpRequest) IsJson

func (x *HttpRequest) IsJson() bool

func (*HttpRequest) IsTextPlain

func (x *HttpRequest) IsTextPlain() bool

func (*HttpRequest) IsXML

func (x *HttpRequest) IsXML() bool

func (*HttpRequest) ParseFormData

func (x *HttpRequest) ParseFormData(r io.Reader) (*multipart.Form, error)

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 HttpResponse

type HttpResponse struct {
	Uuid          string    `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
	Proto         string    `protobuf:"bytes,2,opt,name=proto,proto3" json:"proto,omitempty"`
	Status        int32     `protobuf:"varint,3,opt,name=status,proto3" json:"status,omitempty"`
	ContentLength int64     `protobuf:"varint,4,opt,name=content_length,json=contentLength,proto3" json:"content_length,omitempty"`
	Header        []*Header `protobuf:"bytes,5,rep,name=header,proto3" json:"header,omitempty"`
	ErrorCode     int64     `protobuf:"varint,6,opt,name=error_code,json=errorCode,proto3" json:"error_code,omitempty"`
	// contains filtered or unexported fields
}

func (*HttpResponse) Descriptor deprecated

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

Deprecated: Use HttpResponse.ProtoReflect.Descriptor instead.

func (*HttpResponse) GetContentLength

func (x *HttpResponse) GetContentLength() int64

func (*HttpResponse) GetErrorCode added in v0.1.32

func (x *HttpResponse) GetErrorCode() int64

func (*HttpResponse) GetHeader

func (x *HttpResponse) GetHeader() []*Header

func (*HttpResponse) GetProto

func (x *HttpResponse) GetProto() string

func (*HttpResponse) GetStatus

func (x *HttpResponse) GetStatus() int32

func (*HttpResponse) GetUuid

func (x *HttpResponse) GetUuid() string

func (*HttpResponse) ProtoMessage

func (*HttpResponse) ProtoMessage()

func (*HttpResponse) ProtoReflect

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

func (*HttpResponse) Reset

func (x *HttpResponse) Reset()

func (*HttpResponse) String

func (x *HttpResponse) String() string

type ServerConnect

type ServerConnect struct {
	Prefix    string `protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"`
	PublicUrl string `protobuf:"bytes,2,opt,name=public_url,json=publicUrl,proto3" json:"public_url,omitempty"`
	Expire    int64  `protobuf:"varint,3,opt,name=expire,proto3" json:"expire,omitempty"`
	// contains filtered or unexported fields
}

func (*ServerConnect) Descriptor deprecated

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

Deprecated: Use ServerConnect.ProtoReflect.Descriptor instead.

func (*ServerConnect) GetExpire

func (x *ServerConnect) GetExpire() int64

func (*ServerConnect) GetPrefix

func (x *ServerConnect) GetPrefix() string

func (*ServerConnect) GetPublicUrl

func (x *ServerConnect) GetPublicUrl() string

func (*ServerConnect) ProtoMessage

func (*ServerConnect) ProtoMessage()

func (*ServerConnect) ProtoReflect

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

func (*ServerConnect) Reset

func (x *ServerConnect) Reset()

func (*ServerConnect) String

func (x *ServerConnect) String() string

type ServerHeader

type ServerHeader struct {
	Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
	Private bool   `protobuf:"varint,2,opt,name=private,proto3" json:"private,omitempty"`
	// contains filtered or unexported fields
}

func (*ServerHeader) Descriptor deprecated

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

Deprecated: Use ServerHeader.ProtoReflect.Descriptor instead.

func (*ServerHeader) GetPrivate

func (x *ServerHeader) GetPrivate() bool

func (*ServerHeader) GetVersion

func (x *ServerHeader) GetVersion() string

func (*ServerHeader) ProtoMessage

func (*ServerHeader) ProtoMessage()

func (*ServerHeader) ProtoReflect

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

func (*ServerHeader) Reset

func (x *ServerHeader) Reset()

func (*ServerHeader) String

func (x *ServerHeader) String() string

type Transfer

type Transfer struct {

	// Types that are assignable to Command:
	//	*Transfer_ServerHeader
	//	*Transfer_ClientConnect
	//	*Transfer_ServerConnect
	//	*Transfer_HttpRequest
	//	*Transfer_HttpResponse
	//	*Transfer_BodyChunk
	//	*Transfer_Error
	Command isTransfer_Command `protobuf_oneof:"Command"`
	// contains filtered or unexported fields
}

func (*Transfer) Descriptor deprecated

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

Deprecated: Use Transfer.ProtoReflect.Descriptor instead.

func (*Transfer) GetBodyChunk

func (x *Transfer) GetBodyChunk() *BodyChunk

func (*Transfer) GetClientConnect

func (x *Transfer) GetClientConnect() *ClientConnect

func (*Transfer) GetCommand

func (m *Transfer) GetCommand() isTransfer_Command

func (*Transfer) GetError

func (x *Transfer) GetError() *Error

func (*Transfer) GetHttpRequest

func (x *Transfer) GetHttpRequest() *HttpRequest

func (*Transfer) GetHttpResponse

func (x *Transfer) GetHttpResponse() *HttpResponse

func (*Transfer) GetServerConnect

func (x *Transfer) GetServerConnect() *ServerConnect

func (*Transfer) GetServerHeader

func (x *Transfer) GetServerHeader() *ServerHeader

func (*Transfer) ProtoMessage

func (*Transfer) ProtoMessage()

func (*Transfer) ProtoReflect

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

func (*Transfer) Reset

func (x *Transfer) Reset()

func (*Transfer) String

func (x *Transfer) String() string

type Transfer_BodyChunk

type Transfer_BodyChunk struct {
	BodyChunk *BodyChunk `protobuf:"bytes,6,opt,name=body_chunk,json=bodyChunk,proto3,oneof"`
}

type Transfer_ClientConnect

type Transfer_ClientConnect struct {
	ClientConnect *ClientConnect `protobuf:"bytes,2,opt,name=client_connect,json=clientConnect,proto3,oneof"`
}

type Transfer_Error

type Transfer_Error struct {
	Error *Error `protobuf:"bytes,7,opt,name=error,proto3,oneof"`
}

type Transfer_HttpRequest

type Transfer_HttpRequest struct {
	HttpRequest *HttpRequest `protobuf:"bytes,4,opt,name=http_request,json=httpRequest,proto3,oneof"`
}

type Transfer_HttpResponse

type Transfer_HttpResponse struct {
	HttpResponse *HttpResponse `protobuf:"bytes,5,opt,name=http_response,json=httpResponse,proto3,oneof"`
}

type Transfer_ServerConnect

type Transfer_ServerConnect struct {
	ServerConnect *ServerConnect `protobuf:"bytes,3,opt,name=server_connect,json=serverConnect,proto3,oneof"`
}

type Transfer_ServerHeader

type Transfer_ServerHeader struct {
	ServerHeader *ServerHeader `protobuf:"bytes,1,opt,name=server_header,json=serverHeader,proto3,oneof"`
}

Jump to

Keyboard shortcuts

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