Documentation
¶
Overview ¶
Package api is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterHellomicroHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterHellomicroHandlerClient(ctx context.Context, mux *runtime.ServeMux, client HellomicroClient) error
- func RegisterHellomicroHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterHellomicroHandlerServer(ctx context.Context, mux *runtime.ServeMux, server HellomicroServer) error
- func RegisterHellomicroServer(s grpc.ServiceRegistrar, srv HellomicroServer)
- type Cookie
- func (*Cookie) Descriptor() ([]byte, []int)deprecated
- func (x *Cookie) GetDomain() string
- func (x *Cookie) GetExpires() *timestamppb.Timestamp
- func (x *Cookie) GetHttpOnly() bool
- func (x *Cookie) GetMaxAge() int32
- func (x *Cookie) GetName() string
- func (x *Cookie) GetPath() string
- func (x *Cookie) GetRaw() string
- func (x *Cookie) GetRawExpires() string
- func (x *Cookie) GetSameSite() Cookie_SameSite
- func (x *Cookie) GetSecure() bool
- func (x *Cookie) GetUnparsed() []string
- func (x *Cookie) GetValue() string
- func (*Cookie) ProtoMessage()
- func (x *Cookie) ProtoReflect() protoreflect.Message
- func (x *Cookie) Reset()
- func (x *Cookie) String() string
- type Cookie_SameSite
- func (Cookie_SameSite) Descriptor() protoreflect.EnumDescriptor
- func (x Cookie_SameSite) Enum() *Cookie_SameSite
- func (Cookie_SameSite) EnumDescriptor() ([]byte, []int)deprecated
- func (x Cookie_SameSite) Number() protoreflect.EnumNumber
- func (x Cookie_SameSite) String() string
- func (Cookie_SameSite) Type() protoreflect.EnumType
- type DeleteFileReq
- type DeleteFileRes
- type EchoRes
- func (*EchoRes) Descriptor() ([]byte, []int)deprecated
- func (x *EchoRes) GetBody() string
- func (x *EchoRes) GetContentLength() int64
- func (x *EchoRes) GetCookies() []*Cookie
- func (x *EchoRes) GetHeaders() map[string]*StringArray
- func (x *EchoRes) GetHost() string
- func (x *EchoRes) GetMethod() string
- func (x *EchoRes) GetParams() map[string]*StringArray
- func (x *EchoRes) GetProto() string
- func (x *EchoRes) GetRemoteAddr() string
- func (x *EchoRes) GetRequestUri() string
- func (x *EchoRes) GetUrl() *URL
- func (x *EchoRes) GetUserAgent() string
- func (*EchoRes) ProtoMessage()
- func (x *EchoRes) ProtoReflect() protoreflect.Message
- func (x *EchoRes) Reset()
- func (x *EchoRes) String() string
- type EnvironmentsRes
- func (*EnvironmentsRes) Descriptor() ([]byte, []int)deprecated
- func (x *EnvironmentsRes) GetEnvironments() map[string]string
- func (*EnvironmentsRes) ProtoMessage()
- func (x *EnvironmentsRes) ProtoReflect() protoreflect.Message
- func (x *EnvironmentsRes) Reset()
- func (x *EnvironmentsRes) String() string
- type ExitReq
- type FileInfo
- func (*FileInfo) Descriptor() ([]byte, []int)deprecated
- func (x *FileInfo) GetModTime() *timestamppb.Timestamp
- func (x *FileInfo) GetMode() string
- func (x *FileInfo) GetPath() string
- func (x *FileInfo) GetSize() int64
- func (*FileInfo) ProtoMessage()
- func (x *FileInfo) ProtoReflect() protoreflect.Message
- func (x *FileInfo) Reset()
- func (x *FileInfo) String() string
- type HellomicroClient
- type HellomicroServer
- type InfoRes
- func (*InfoRes) Descriptor() ([]byte, []int)deprecated
- func (x *InfoRes) GetMemory() *InfoRes_Memory
- func (x *InfoRes) GetNumCgoCall() int64
- func (x *InfoRes) GetNumCpu() int32
- func (x *InfoRes) GetNumGoRoutine() int32
- func (x *InfoRes) GetOs() string
- func (x *InfoRes) GetVersion() string
- func (*InfoRes) ProtoMessage()
- func (x *InfoRes) ProtoReflect() protoreflect.Message
- func (x *InfoRes) Reset()
- func (x *InfoRes) String() string
- type InfoRes_Memory
- func (*InfoRes_Memory) Descriptor() ([]byte, []int)deprecated
- func (x *InfoRes_Memory) GetAlloc() uint64
- func (x *InfoRes_Memory) GetNumGc() uint32
- func (x *InfoRes_Memory) GetSys() uint64
- func (x *InfoRes_Memory) GetTotalAlloc() uint64
- func (*InfoRes_Memory) ProtoMessage()
- func (x *InfoRes_Memory) ProtoReflect() protoreflect.Message
- func (x *InfoRes_Memory) Reset()
- func (x *InfoRes_Memory) String() string
- type LatencyReq
- type ListFilesReq
- type ListFilesRes
- type LogReq
- type ReadFileReq
- type ReadFileRes
- type RequestReq
- func (*RequestReq) Descriptor() ([]byte, []int)deprecated
- func (x *RequestReq) GetBody() string
- func (x *RequestReq) GetMethod() string
- func (x *RequestReq) GetUrl() string
- func (*RequestReq) ProtoMessage()
- func (x *RequestReq) ProtoReflect() protoreflect.Message
- func (x *RequestReq) Reset()
- func (x *RequestReq) String() string
- type RequestRes
- func (*RequestRes) Descriptor() ([]byte, []int)deprecated
- func (x *RequestRes) GetBody() string
- func (x *RequestRes) GetHeaders() map[string]*StringArray
- func (x *RequestRes) GetStatusCode() int32
- func (*RequestRes) ProtoMessage()
- func (x *RequestRes) ProtoReflect() protoreflect.Message
- func (x *RequestRes) Reset()
- func (x *RequestRes) String() string
- type StringArray
- type URL
- func (*URL) Descriptor() ([]byte, []int)deprecated
- func (x *URL) GetForceQuery() bool
- func (x *URL) GetFragment() string
- func (x *URL) GetHost() string
- func (x *URL) GetOpaque() string
- func (x *URL) GetPassword() string
- func (x *URL) GetPasswordSet() bool
- func (x *URL) GetPath() string
- func (x *URL) GetRawFragment() string
- func (x *URL) GetRawPath() string
- func (x *URL) GetRawQuery() string
- func (x *URL) GetScheme() string
- func (x *URL) GetUsername() string
- func (*URL) ProtoMessage()
- func (x *URL) ProtoReflect() protoreflect.Message
- func (x *URL) Reset()
- func (x *URL) String() string
- type UnimplementedHellomicroServer
- func (UnimplementedHellomicroServer) Crash(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
- func (UnimplementedHellomicroServer) DeleteFile(context.Context, *DeleteFileReq) (*DeleteFileRes, error)
- func (UnimplementedHellomicroServer) Echo(context.Context, *emptypb.Empty) (*EchoRes, error)
- func (UnimplementedHellomicroServer) Environments(context.Context, *emptypb.Empty) (*EnvironmentsRes, error)
- func (UnimplementedHellomicroServer) Exit(context.Context, *ExitReq) (*emptypb.Empty, error)
- func (UnimplementedHellomicroServer) Info(context.Context, *emptypb.Empty) (*InfoRes, error)
- func (UnimplementedHellomicroServer) Latency(context.Context, *LatencyReq) (*emptypb.Empty, error)
- func (UnimplementedHellomicroServer) ListFiles(context.Context, *ListFilesReq) (*ListFilesRes, error)
- func (UnimplementedHellomicroServer) Log(context.Context, *LogReq) (*emptypb.Empty, error)
- func (UnimplementedHellomicroServer) Panic(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
- func (UnimplementedHellomicroServer) Ping(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
- func (UnimplementedHellomicroServer) ReadFile(context.Context, *ReadFileReq) (*ReadFileRes, error)
- func (UnimplementedHellomicroServer) Request(context.Context, *RequestReq) (*RequestRes, error)
- func (UnimplementedHellomicroServer) WriteFile(context.Context, *WriteFileReq) (*emptypb.Empty, error)
- type UnsafeHellomicroServer
- type WriteFileReq
- func (*WriteFileReq) Descriptor() ([]byte, []int)deprecated
- func (x *WriteFileReq) GetContent() []byte
- func (x *WriteFileReq) GetMode() string
- func (x *WriteFileReq) GetPath() string
- func (*WriteFileReq) ProtoMessage()
- func (x *WriteFileReq) ProtoReflect() protoreflect.Message
- func (x *WriteFileReq) Reset()
- func (x *WriteFileReq) String() string
Constants ¶
const ( Hellomicro_Ping_FullMethodName = "/api.hellomicro.v1.Hellomicro/Ping" Hellomicro_Crash_FullMethodName = "/api.hellomicro.v1.Hellomicro/Crash" Hellomicro_Panic_FullMethodName = "/api.hellomicro.v1.Hellomicro/Panic" Hellomicro_Exit_FullMethodName = "/api.hellomicro.v1.Hellomicro/Exit" Hellomicro_Log_FullMethodName = "/api.hellomicro.v1.Hellomicro/Log" Hellomicro_Latency_FullMethodName = "/api.hellomicro.v1.Hellomicro/Latency" Hellomicro_Info_FullMethodName = "/api.hellomicro.v1.Hellomicro/Info" Hellomicro_Environments_FullMethodName = "/api.hellomicro.v1.Hellomicro/Environments" Hellomicro_Echo_FullMethodName = "/api.hellomicro.v1.Hellomicro/Echo" Hellomicro_Request_FullMethodName = "/api.hellomicro.v1.Hellomicro/Request" Hellomicro_ListFiles_FullMethodName = "/api.hellomicro.v1.Hellomicro/ListFiles" Hellomicro_ReadFile_FullMethodName = "/api.hellomicro.v1.Hellomicro/ReadFile" Hellomicro_WriteFile_FullMethodName = "/api.hellomicro.v1.Hellomicro/WriteFile" Hellomicro_DeleteFile_FullMethodName = "/api.hellomicro.v1.Hellomicro/DeleteFile" )
Variables ¶
var ( Cookie_SameSite_name = map[int32]string{ 0: "TYPE_UNSPECIFIED", 1: "DEFAULT_MODE", 2: "LAX_MODE", 3: "STRICT_MODE", 4: "NONE_MODE", } Cookie_SameSite_value = map[string]int32{ "TYPE_UNSPECIFIED": 0, "DEFAULT_MODE": 1, "LAX_MODE": 2, "STRICT_MODE": 3, "NONE_MODE": 4, } )
Enum value maps for Cookie_SameSite.
var File_proto_service_proto protoreflect.FileDescriptor
var Hellomicro_ServiceDesc = grpc.ServiceDesc{ ServiceName: "api.hellomicro.v1.Hellomicro", HandlerType: (*HellomicroServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Ping", Handler: _Hellomicro_Ping_Handler, }, { MethodName: "Crash", Handler: _Hellomicro_Crash_Handler, }, { MethodName: "Panic", Handler: _Hellomicro_Panic_Handler, }, { MethodName: "Exit", Handler: _Hellomicro_Exit_Handler, }, { MethodName: "Log", Handler: _Hellomicro_Log_Handler, }, { MethodName: "Latency", Handler: _Hellomicro_Latency_Handler, }, { MethodName: "Info", Handler: _Hellomicro_Info_Handler, }, { MethodName: "Environments", Handler: _Hellomicro_Environments_Handler, }, { MethodName: "Echo", Handler: _Hellomicro_Echo_Handler, }, { MethodName: "Request", Handler: _Hellomicro_Request_Handler, }, { MethodName: "ListFiles", Handler: _Hellomicro_ListFiles_Handler, }, { MethodName: "ReadFile", Handler: _Hellomicro_ReadFile_Handler, }, { MethodName: "WriteFile", Handler: _Hellomicro_WriteFile_Handler, }, { MethodName: "DeleteFile", Handler: _Hellomicro_DeleteFile_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/service.proto", }
Hellomicro_ServiceDesc is the grpc.ServiceDesc for Hellomicro service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterHellomicroHandler ¶
func RegisterHellomicroHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterHellomicroHandler registers the http handlers for service Hellomicro to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterHellomicroHandlerClient ¶
func RegisterHellomicroHandlerClient(ctx context.Context, mux *runtime.ServeMux, client HellomicroClient) error
RegisterHellomicroHandlerClient registers the http handlers for service Hellomicro to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "HellomicroClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "HellomicroClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "HellomicroClient" to call the correct interceptors. This client ignores the HTTP middlewares.
func RegisterHellomicroHandlerFromEndpoint ¶
func RegisterHellomicroHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterHellomicroHandlerFromEndpoint is same as RegisterHellomicroHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterHellomicroHandlerServer ¶
func RegisterHellomicroHandlerServer(ctx context.Context, mux *runtime.ServeMux, server HellomicroServer) error
RegisterHellomicroHandlerServer registers the http handlers for service Hellomicro to "mux". UnaryRPC :call HellomicroServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterHellomicroHandlerFromEndpoint instead. GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
func RegisterHellomicroServer ¶
func RegisterHellomicroServer(s grpc.ServiceRegistrar, srv HellomicroServer)
Types ¶
type Cookie ¶
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 *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=expires,proto3" json:"expires,omitempty"` RawExpires string `protobuf:"bytes,6,opt,name=raw_expires,json=rawExpires,proto3" json:"raw_expires,omitempty"` MaxAge int32 `protobuf:"varint,7,opt,name=max_age,json=maxAge,proto3" json:"max_age,omitempty"` Secure bool `protobuf:"varint,8,opt,name=secure,proto3" json:"secure,omitempty"` HttpOnly bool `protobuf:"varint,9,opt,name=http_only,json=httpOnly,proto3" json:"http_only,omitempty"` SameSite Cookie_SameSite `` /* 126-byte string literal not displayed */ Raw string `protobuf:"bytes,11,opt,name=raw,proto3" json:"raw,omitempty"` Unparsed []string `protobuf:"bytes,12,rep,name=unparsed,proto3" json:"unparsed,omitempty"` // contains filtered or unexported fields }
func (*Cookie) Descriptor
deprecated
func (*Cookie) GetExpires ¶
func (x *Cookie) GetExpires() *timestamppb.Timestamp
func (*Cookie) GetHttpOnly ¶
func (*Cookie) GetRawExpires ¶
func (*Cookie) GetSameSite ¶
func (x *Cookie) GetSameSite() Cookie_SameSite
func (*Cookie) GetUnparsed ¶
func (*Cookie) ProtoMessage ¶
func (*Cookie) ProtoMessage()
func (*Cookie) ProtoReflect ¶
func (x *Cookie) ProtoReflect() protoreflect.Message
type Cookie_SameSite ¶
type Cookie_SameSite int32
const ( Cookie_TYPE_UNSPECIFIED Cookie_SameSite = 0 Cookie_DEFAULT_MODE Cookie_SameSite = 1 Cookie_LAX_MODE Cookie_SameSite = 2 Cookie_STRICT_MODE Cookie_SameSite = 3 Cookie_NONE_MODE Cookie_SameSite = 4 )
func (Cookie_SameSite) Descriptor ¶
func (Cookie_SameSite) Descriptor() protoreflect.EnumDescriptor
func (Cookie_SameSite) Enum ¶
func (x Cookie_SameSite) Enum() *Cookie_SameSite
func (Cookie_SameSite) EnumDescriptor
deprecated
func (Cookie_SameSite) EnumDescriptor() ([]byte, []int)
Deprecated: Use Cookie_SameSite.Descriptor instead.
func (Cookie_SameSite) Number ¶
func (x Cookie_SameSite) Number() protoreflect.EnumNumber
func (Cookie_SameSite) String ¶
func (x Cookie_SameSite) String() string
func (Cookie_SameSite) Type ¶
func (Cookie_SameSite) Type() protoreflect.EnumType
type DeleteFileReq ¶
type DeleteFileReq struct {
// contains filtered or unexported fields
}
func (*DeleteFileReq) Descriptor
deprecated
func (*DeleteFileReq) Descriptor() ([]byte, []int)
Deprecated: Use DeleteFileReq.ProtoReflect.Descriptor instead.
func (*DeleteFileReq) ProtoMessage ¶
func (*DeleteFileReq) ProtoMessage()
func (*DeleteFileReq) ProtoReflect ¶
func (x *DeleteFileReq) ProtoReflect() protoreflect.Message
func (*DeleteFileReq) Reset ¶
func (x *DeleteFileReq) Reset()
func (*DeleteFileReq) String ¶
func (x *DeleteFileReq) String() string
type DeleteFileRes ¶
type DeleteFileRes struct {
// contains filtered or unexported fields
}
func (*DeleteFileRes) Descriptor
deprecated
func (*DeleteFileRes) Descriptor() ([]byte, []int)
Deprecated: Use DeleteFileRes.ProtoReflect.Descriptor instead.
func (*DeleteFileRes) ProtoMessage ¶
func (*DeleteFileRes) ProtoMessage()
func (*DeleteFileRes) ProtoReflect ¶
func (x *DeleteFileRes) ProtoReflect() protoreflect.Message
func (*DeleteFileRes) Reset ¶
func (x *DeleteFileRes) Reset()
func (*DeleteFileRes) String ¶
func (x *DeleteFileRes) String() string
type EchoRes ¶
type EchoRes struct { Method string `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"` Proto string `protobuf:"bytes,2,opt,name=proto,proto3" json:"proto,omitempty"` ContentLength int64 `protobuf:"varint,3,opt,name=content_length,json=contentLength,proto3" json:"content_length,omitempty"` RemoteAddr string `protobuf:"bytes,4,opt,name=remote_addr,json=remoteAddr,proto3" json:"remote_addr,omitempty"` RequestUri string `protobuf:"bytes,5,opt,name=request_uri,json=requestUri,proto3" json:"request_uri,omitempty"` Host string `protobuf:"bytes,6,opt,name=host,proto3" json:"host,omitempty"` UserAgent string `protobuf:"bytes,7,opt,name=user_agent,json=userAgent,proto3" json:"user_agent,omitempty"` Body string `protobuf:"bytes,8,opt,name=body,proto3" json:"body,omitempty"` Headers map[string]*StringArray `` /* 155-byte string literal not displayed */ Params map[string]*StringArray `` /* 154-byte string literal not displayed */ Url *URL `protobuf:"bytes,11,opt,name=url,proto3" json:"url,omitempty"` Cookies []*Cookie `protobuf:"bytes,12,rep,name=cookies,proto3" json:"cookies,omitempty"` // contains filtered or unexported fields }
func (*EchoRes) Descriptor
deprecated
func (*EchoRes) GetContentLength ¶
func (*EchoRes) GetCookies ¶
func (*EchoRes) GetHeaders ¶
func (x *EchoRes) GetHeaders() map[string]*StringArray
func (*EchoRes) GetParams ¶
func (x *EchoRes) GetParams() map[string]*StringArray
func (*EchoRes) GetRemoteAddr ¶
func (*EchoRes) GetRequestUri ¶
func (*EchoRes) GetUserAgent ¶
func (*EchoRes) ProtoMessage ¶
func (*EchoRes) ProtoMessage()
func (*EchoRes) ProtoReflect ¶
func (x *EchoRes) ProtoReflect() protoreflect.Message
type EnvironmentsRes ¶
type EnvironmentsRes struct { Environments map[string]string `` /* 165-byte string literal not displayed */ // contains filtered or unexported fields }
func (*EnvironmentsRes) Descriptor
deprecated
func (*EnvironmentsRes) Descriptor() ([]byte, []int)
Deprecated: Use EnvironmentsRes.ProtoReflect.Descriptor instead.
func (*EnvironmentsRes) GetEnvironments ¶
func (x *EnvironmentsRes) GetEnvironments() map[string]string
func (*EnvironmentsRes) ProtoMessage ¶
func (*EnvironmentsRes) ProtoMessage()
func (*EnvironmentsRes) ProtoReflect ¶
func (x *EnvironmentsRes) ProtoReflect() protoreflect.Message
func (*EnvironmentsRes) Reset ¶
func (x *EnvironmentsRes) Reset()
func (*EnvironmentsRes) String ¶
func (x *EnvironmentsRes) String() string
type ExitReq ¶
type ExitReq struct { Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` // contains filtered or unexported fields }
* Requests
func (*ExitReq) Descriptor
deprecated
func (*ExitReq) ProtoMessage ¶
func (*ExitReq) ProtoMessage()
func (*ExitReq) ProtoReflect ¶
func (x *ExitReq) ProtoReflect() protoreflect.Message
type FileInfo ¶
type FileInfo struct { Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` Size int64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"` Mode string `protobuf:"bytes,3,opt,name=mode,proto3" json:"mode,omitempty"` ModTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=modTime,proto3" json:"modTime,omitempty"` // contains filtered or unexported fields }
func (*FileInfo) Descriptor
deprecated
func (*FileInfo) GetModTime ¶
func (x *FileInfo) GetModTime() *timestamppb.Timestamp
func (*FileInfo) ProtoMessage ¶
func (*FileInfo) ProtoMessage()
func (*FileInfo) ProtoReflect ¶
func (x *FileInfo) ProtoReflect() protoreflect.Message
type HellomicroClient ¶
type HellomicroClient interface { Ping(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) Crash(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) Panic(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) Exit(ctx context.Context, in *ExitReq, opts ...grpc.CallOption) (*emptypb.Empty, error) Log(ctx context.Context, in *LogReq, opts ...grpc.CallOption) (*emptypb.Empty, error) Latency(ctx context.Context, in *LatencyReq, opts ...grpc.CallOption) (*emptypb.Empty, error) Info(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*InfoRes, error) Environments(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*EnvironmentsRes, error) Echo(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*EchoRes, error) Request(ctx context.Context, in *RequestReq, opts ...grpc.CallOption) (*RequestRes, error) ListFiles(ctx context.Context, in *ListFilesReq, opts ...grpc.CallOption) (*ListFilesRes, error) ReadFile(ctx context.Context, in *ReadFileReq, opts ...grpc.CallOption) (*ReadFileRes, error) WriteFile(ctx context.Context, in *WriteFileReq, opts ...grpc.CallOption) (*emptypb.Empty, error) DeleteFile(ctx context.Context, in *DeleteFileReq, opts ...grpc.CallOption) (*DeleteFileRes, error) }
HellomicroClient is the client API for Hellomicro service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewHellomicroClient ¶
func NewHellomicroClient(cc grpc.ClientConnInterface) HellomicroClient
type HellomicroServer ¶
type HellomicroServer interface { Ping(context.Context, *emptypb.Empty) (*emptypb.Empty, error) Crash(context.Context, *emptypb.Empty) (*emptypb.Empty, error) Panic(context.Context, *emptypb.Empty) (*emptypb.Empty, error) Exit(context.Context, *ExitReq) (*emptypb.Empty, error) Log(context.Context, *LogReq) (*emptypb.Empty, error) Latency(context.Context, *LatencyReq) (*emptypb.Empty, error) Info(context.Context, *emptypb.Empty) (*InfoRes, error) Environments(context.Context, *emptypb.Empty) (*EnvironmentsRes, error) Echo(context.Context, *emptypb.Empty) (*EchoRes, error) Request(context.Context, *RequestReq) (*RequestRes, error) ListFiles(context.Context, *ListFilesReq) (*ListFilesRes, error) ReadFile(context.Context, *ReadFileReq) (*ReadFileRes, error) WriteFile(context.Context, *WriteFileReq) (*emptypb.Empty, error) DeleteFile(context.Context, *DeleteFileReq) (*DeleteFileRes, error) }
HellomicroServer is the server API for Hellomicro service. All implementations should embed UnimplementedHellomicroServer for forward compatibility.
type InfoRes ¶
type InfoRes struct { Os string `protobuf:"bytes,1,opt,name=os,proto3" json:"os,omitempty"` Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` NumCpu int32 `protobuf:"varint,3,opt,name=num_cpu,json=numCpu,proto3" json:"num_cpu,omitempty"` NumGoRoutine int32 `protobuf:"varint,4,opt,name=num_go_routine,json=numGoRoutine,proto3" json:"num_go_routine,omitempty"` NumCgoCall int64 `protobuf:"varint,5,opt,name=num_cgo_call,json=numCgoCall,proto3" json:"num_cgo_call,omitempty"` Memory *InfoRes_Memory `protobuf:"bytes,6,opt,name=memory,proto3" json:"memory,omitempty"` // contains filtered or unexported fields }
func (*InfoRes) Descriptor
deprecated
func (*InfoRes) GetMemory ¶
func (x *InfoRes) GetMemory() *InfoRes_Memory
func (*InfoRes) GetNumCgoCall ¶
func (*InfoRes) GetNumGoRoutine ¶
func (*InfoRes) GetVersion ¶
func (*InfoRes) ProtoMessage ¶
func (*InfoRes) ProtoMessage()
func (*InfoRes) ProtoReflect ¶
func (x *InfoRes) ProtoReflect() protoreflect.Message
type InfoRes_Memory ¶
type InfoRes_Memory struct { Alloc uint64 `protobuf:"varint,1,opt,name=alloc,proto3" json:"alloc,omitempty"` TotalAlloc uint64 `protobuf:"varint,2,opt,name=total_alloc,json=totalAlloc,proto3" json:"total_alloc,omitempty"` Sys uint64 `protobuf:"varint,3,opt,name=sys,proto3" json:"sys,omitempty"` NumGc uint32 `protobuf:"varint,4,opt,name=num_gc,json=numGc,proto3" json:"num_gc,omitempty"` // contains filtered or unexported fields }
func (*InfoRes_Memory) Descriptor
deprecated
func (*InfoRes_Memory) Descriptor() ([]byte, []int)
Deprecated: Use InfoRes_Memory.ProtoReflect.Descriptor instead.
func (*InfoRes_Memory) GetAlloc ¶
func (x *InfoRes_Memory) GetAlloc() uint64
func (*InfoRes_Memory) GetNumGc ¶
func (x *InfoRes_Memory) GetNumGc() uint32
func (*InfoRes_Memory) GetSys ¶
func (x *InfoRes_Memory) GetSys() uint64
func (*InfoRes_Memory) GetTotalAlloc ¶
func (x *InfoRes_Memory) GetTotalAlloc() uint64
func (*InfoRes_Memory) ProtoMessage ¶
func (*InfoRes_Memory) ProtoMessage()
func (*InfoRes_Memory) ProtoReflect ¶
func (x *InfoRes_Memory) ProtoReflect() protoreflect.Message
func (*InfoRes_Memory) Reset ¶
func (x *InfoRes_Memory) Reset()
func (*InfoRes_Memory) String ¶
func (x *InfoRes_Memory) String() string
type LatencyReq ¶
type LatencyReq struct { Duration int32 `protobuf:"varint,1,opt,name=duration,proto3" json:"duration,omitempty"` // contains filtered or unexported fields }
func (*LatencyReq) Descriptor
deprecated
func (*LatencyReq) Descriptor() ([]byte, []int)
Deprecated: Use LatencyReq.ProtoReflect.Descriptor instead.
func (*LatencyReq) GetDuration ¶
func (x *LatencyReq) GetDuration() int32
func (*LatencyReq) ProtoMessage ¶
func (*LatencyReq) ProtoMessage()
func (*LatencyReq) ProtoReflect ¶
func (x *LatencyReq) ProtoReflect() protoreflect.Message
func (*LatencyReq) Reset ¶
func (x *LatencyReq) Reset()
func (*LatencyReq) String ¶
func (x *LatencyReq) String() string
type ListFilesReq ¶
type ListFilesReq struct { Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` // contains filtered or unexported fields }
func (*ListFilesReq) Descriptor
deprecated
func (*ListFilesReq) Descriptor() ([]byte, []int)
Deprecated: Use ListFilesReq.ProtoReflect.Descriptor instead.
func (*ListFilesReq) GetPath ¶
func (x *ListFilesReq) GetPath() string
func (*ListFilesReq) ProtoMessage ¶
func (*ListFilesReq) ProtoMessage()
func (*ListFilesReq) ProtoReflect ¶
func (x *ListFilesReq) ProtoReflect() protoreflect.Message
func (*ListFilesReq) Reset ¶
func (x *ListFilesReq) Reset()
func (*ListFilesReq) String ¶
func (x *ListFilesReq) String() string
type ListFilesRes ¶
type ListFilesRes struct { FileInfos []*FileInfo `protobuf:"bytes,1,rep,name=file_infos,json=fileInfos,proto3" json:"file_infos,omitempty"` // contains filtered or unexported fields }
func (*ListFilesRes) Descriptor
deprecated
func (*ListFilesRes) Descriptor() ([]byte, []int)
Deprecated: Use ListFilesRes.ProtoReflect.Descriptor instead.
func (*ListFilesRes) GetFileInfos ¶
func (x *ListFilesRes) GetFileInfos() []*FileInfo
func (*ListFilesRes) ProtoMessage ¶
func (*ListFilesRes) ProtoMessage()
func (*ListFilesRes) ProtoReflect ¶
func (x *ListFilesRes) ProtoReflect() protoreflect.Message
func (*ListFilesRes) Reset ¶
func (x *ListFilesRes) Reset()
func (*ListFilesRes) String ¶
func (x *ListFilesRes) String() string
type LogReq ¶
type LogReq struct { Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` // contains filtered or unexported fields }
func (*LogReq) Descriptor
deprecated
func (*LogReq) ProtoMessage ¶
func (*LogReq) ProtoMessage()
func (*LogReq) ProtoReflect ¶
func (x *LogReq) ProtoReflect() protoreflect.Message
type ReadFileReq ¶
type ReadFileReq struct {
// contains filtered or unexported fields
}
func (*ReadFileReq) Descriptor
deprecated
func (*ReadFileReq) Descriptor() ([]byte, []int)
Deprecated: Use ReadFileReq.ProtoReflect.Descriptor instead.
func (*ReadFileReq) ProtoMessage ¶
func (*ReadFileReq) ProtoMessage()
func (*ReadFileReq) ProtoReflect ¶
func (x *ReadFileReq) ProtoReflect() protoreflect.Message
func (*ReadFileReq) Reset ¶
func (x *ReadFileReq) Reset()
func (*ReadFileReq) String ¶
func (x *ReadFileReq) String() string
type ReadFileRes ¶
type ReadFileRes struct {
// contains filtered or unexported fields
}
func (*ReadFileRes) Descriptor
deprecated
func (*ReadFileRes) Descriptor() ([]byte, []int)
Deprecated: Use ReadFileRes.ProtoReflect.Descriptor instead.
func (*ReadFileRes) ProtoMessage ¶
func (*ReadFileRes) ProtoMessage()
func (*ReadFileRes) ProtoReflect ¶
func (x *ReadFileRes) ProtoReflect() protoreflect.Message
func (*ReadFileRes) Reset ¶
func (x *ReadFileRes) Reset()
func (*ReadFileRes) String ¶
func (x *ReadFileRes) String() string
type RequestReq ¶
type RequestReq struct { Method string `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"` Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` Body string `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"` // contains filtered or unexported fields }
func (*RequestReq) Descriptor
deprecated
func (*RequestReq) Descriptor() ([]byte, []int)
Deprecated: Use RequestReq.ProtoReflect.Descriptor instead.
func (*RequestReq) GetBody ¶
func (x *RequestReq) GetBody() string
func (*RequestReq) GetMethod ¶
func (x *RequestReq) GetMethod() string
func (*RequestReq) GetUrl ¶
func (x *RequestReq) GetUrl() string
func (*RequestReq) ProtoMessage ¶
func (*RequestReq) ProtoMessage()
func (*RequestReq) ProtoReflect ¶
func (x *RequestReq) ProtoReflect() protoreflect.Message
func (*RequestReq) Reset ¶
func (x *RequestReq) Reset()
func (*RequestReq) String ¶
func (x *RequestReq) String() string
type RequestRes ¶
type RequestRes struct { Body string `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` StatusCode int32 `protobuf:"varint,2,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"` Headers map[string]*StringArray `` /* 155-byte string literal not displayed */ // contains filtered or unexported fields }
func (*RequestRes) Descriptor
deprecated
func (*RequestRes) Descriptor() ([]byte, []int)
Deprecated: Use RequestRes.ProtoReflect.Descriptor instead.
func (*RequestRes) GetBody ¶
func (x *RequestRes) GetBody() string
func (*RequestRes) GetHeaders ¶
func (x *RequestRes) GetHeaders() map[string]*StringArray
func (*RequestRes) GetStatusCode ¶
func (x *RequestRes) GetStatusCode() int32
func (*RequestRes) ProtoMessage ¶
func (*RequestRes) ProtoMessage()
func (*RequestRes) ProtoReflect ¶
func (x *RequestRes) ProtoReflect() protoreflect.Message
func (*RequestRes) Reset ¶
func (x *RequestRes) Reset()
func (*RequestRes) String ¶
func (x *RequestRes) String() string
type StringArray ¶
type StringArray struct { Values []string `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"` // contains filtered or unexported fields }
func (*StringArray) Descriptor
deprecated
func (*StringArray) Descriptor() ([]byte, []int)
Deprecated: Use StringArray.ProtoReflect.Descriptor instead.
func (*StringArray) GetValues ¶
func (x *StringArray) GetValues() []string
func (*StringArray) ProtoMessage ¶
func (*StringArray) ProtoMessage()
func (*StringArray) ProtoReflect ¶
func (x *StringArray) ProtoReflect() protoreflect.Message
func (*StringArray) Reset ¶
func (x *StringArray) Reset()
func (*StringArray) String ¶
func (x *StringArray) String() string
type URL ¶
type URL struct { Scheme string `protobuf:"bytes,1,opt,name=scheme,proto3" json:"scheme,omitempty"` Opaque string `protobuf:"bytes,2,opt,name=opaque,proto3" json:"opaque,omitempty"` Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"` Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"` Host string `protobuf:"bytes,5,opt,name=host,proto3" json:"host,omitempty"` Path string `protobuf:"bytes,6,opt,name=path,proto3" json:"path,omitempty"` RawPath string `protobuf:"bytes,7,opt,name=raw_path,json=rawPath,proto3" json:"raw_path,omitempty"` RawQuery string `protobuf:"bytes,8,opt,name=raw_query,json=rawQuery,proto3" json:"raw_query,omitempty"` Fragment string `protobuf:"bytes,9,opt,name=fragment,proto3" json:"fragment,omitempty"` RawFragment string `protobuf:"bytes,10,opt,name=raw_fragment,json=rawFragment,proto3" json:"raw_fragment,omitempty"` ForceQuery bool `protobuf:"varint,11,opt,name=force_query,json=forceQuery,proto3" json:"force_query,omitempty"` PasswordSet bool `protobuf:"varint,12,opt,name=password_set,json=passwordSet,proto3" json:"password_set,omitempty"` // contains filtered or unexported fields }
func (*URL) Descriptor
deprecated
func (*URL) GetForceQuery ¶
func (*URL) GetFragment ¶
func (*URL) GetPassword ¶
func (*URL) GetPasswordSet ¶
func (*URL) GetRawFragment ¶
func (*URL) GetRawPath ¶
func (*URL) GetRawQuery ¶
func (*URL) GetUsername ¶
func (*URL) ProtoMessage ¶
func (*URL) ProtoMessage()
func (*URL) ProtoReflect ¶
func (x *URL) ProtoReflect() protoreflect.Message
type UnimplementedHellomicroServer ¶
type UnimplementedHellomicroServer struct{}
UnimplementedHellomicroServer should be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedHellomicroServer) DeleteFile ¶
func (UnimplementedHellomicroServer) DeleteFile(context.Context, *DeleteFileReq) (*DeleteFileRes, error)
func (UnimplementedHellomicroServer) Environments ¶
func (UnimplementedHellomicroServer) Environments(context.Context, *emptypb.Empty) (*EnvironmentsRes, error)
func (UnimplementedHellomicroServer) Latency ¶
func (UnimplementedHellomicroServer) Latency(context.Context, *LatencyReq) (*emptypb.Empty, error)
func (UnimplementedHellomicroServer) ListFiles ¶
func (UnimplementedHellomicroServer) ListFiles(context.Context, *ListFilesReq) (*ListFilesRes, error)
func (UnimplementedHellomicroServer) ReadFile ¶
func (UnimplementedHellomicroServer) ReadFile(context.Context, *ReadFileReq) (*ReadFileRes, error)
func (UnimplementedHellomicroServer) Request ¶
func (UnimplementedHellomicroServer) Request(context.Context, *RequestReq) (*RequestRes, error)
func (UnimplementedHellomicroServer) WriteFile ¶
func (UnimplementedHellomicroServer) WriteFile(context.Context, *WriteFileReq) (*emptypb.Empty, error)
type UnsafeHellomicroServer ¶
type UnsafeHellomicroServer interface {
// contains filtered or unexported methods
}
UnsafeHellomicroServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to HellomicroServer will result in compilation errors.
type WriteFileReq ¶
type WriteFileReq struct { Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` Content []byte `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"` Mode string `protobuf:"bytes,3,opt,name=mode,proto3" json:"mode,omitempty"` // contains filtered or unexported fields }
func (*WriteFileReq) Descriptor
deprecated
func (*WriteFileReq) Descriptor() ([]byte, []int)
Deprecated: Use WriteFileReq.ProtoReflect.Descriptor instead.
func (*WriteFileReq) GetContent ¶
func (x *WriteFileReq) GetContent() []byte
func (*WriteFileReq) GetMode ¶
func (x *WriteFileReq) GetMode() string
func (*WriteFileReq) GetPath ¶
func (x *WriteFileReq) GetPath() string
func (*WriteFileReq) ProtoMessage ¶
func (*WriteFileReq) ProtoMessage()
func (*WriteFileReq) ProtoReflect ¶
func (x *WriteFileReq) ProtoReflect() protoreflect.Message
func (*WriteFileReq) Reset ¶
func (x *WriteFileReq) Reset()
func (*WriteFileReq) String ¶
func (x *WriteFileReq) String() string