Documentation ¶
Overview ¶
Package v1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterVinceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterVinceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client VinceClient) error
- func RegisterVinceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterVinceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server VinceServer) error
- func RegisterVinceServer(s grpc.ServiceRegistrar, srv VinceServer)
- type Account
- func (*Account) Descriptor() ([]byte, []int)deprecated
- func (x *Account) GetHashedPassword() []byte
- func (x *Account) GetName() string
- func (m *Account) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *Account) MarshalToVT(dAtA []byte) (int, error)
- func (m *Account) MarshalVT() (dAtA []byte, err error)
- func (*Account) ProtoMessage()
- func (x *Account) ProtoReflect() protoreflect.Message
- func (x *Account) Reset()
- func (m *Account) SizeVT() (n int)
- func (x *Account) String() string
- func (m *Account) UnmarshalVT(dAtA []byte) error
- type ApplyClusterRequest
- func (*ApplyClusterRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ApplyClusterRequest) GetConfig() *v1.Cluster_Config
- func (m *ApplyClusterRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *ApplyClusterRequest) MarshalToVT(dAtA []byte) (int, error)
- func (m *ApplyClusterRequest) MarshalVT() (dAtA []byte, err error)
- func (*ApplyClusterRequest) ProtoMessage()
- func (x *ApplyClusterRequest) ProtoReflect() protoreflect.Message
- func (x *ApplyClusterRequest) Reset()
- func (m *ApplyClusterRequest) SizeVT() (n int)
- func (x *ApplyClusterRequest) String() string
- func (m *ApplyClusterRequest) UnmarshalVT(dAtA []byte) error
- type ApplyClusterResponse
- func (*ApplyClusterResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ApplyClusterResponse) GetOk() string
- func (m *ApplyClusterResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *ApplyClusterResponse) MarshalToVT(dAtA []byte) (int, error)
- func (m *ApplyClusterResponse) MarshalVT() (dAtA []byte, err error)
- func (*ApplyClusterResponse) ProtoMessage()
- func (x *ApplyClusterResponse) ProtoReflect() protoreflect.Message
- func (x *ApplyClusterResponse) Reset()
- func (m *ApplyClusterResponse) SizeVT() (n int)
- func (x *ApplyClusterResponse) String() string
- func (m *ApplyClusterResponse) UnmarshalVT(dAtA []byte) error
- type Error
- func (*Error) Descriptor() ([]byte, []int)deprecated
- func (x *Error) GetCode() int32
- func (x *Error) GetError() string
- func (m *Error) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *Error) MarshalToVT(dAtA []byte) (int, error)
- func (m *Error) MarshalVT() (dAtA []byte, err error)
- func (*Error) ProtoMessage()
- func (x *Error) ProtoReflect() protoreflect.Message
- func (x *Error) Reset()
- func (m *Error) SizeVT() (n int)
- func (x *Error) String() string
- func (m *Error) UnmarshalVT(dAtA []byte) error
- type Event
- func (*Event) Descriptor() ([]byte, []int)deprecated
- func (x *Event) GetD() string
- func (x *Event) GetH() bool
- func (x *Event) GetIp() string
- func (x *Event) GetN() string
- func (x *Event) GetR() string
- func (x *Event) GetUa() string
- func (x *Event) GetUrl() string
- func (x *Event) GetW() int32
- func (m *Event) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *Event) MarshalToVT(dAtA []byte) (int, error)
- func (m *Event) MarshalVT() (dAtA []byte, err error)
- func (*Event) ProtoMessage()
- func (x *Event) ProtoReflect() protoreflect.Message
- func (x *Event) Reset()
- func (m *Event) SizeVT() (n int)
- func (x *Event) String() string
- func (m *Event) UnmarshalVT(dAtA []byte) error
- type GetClusterRequest
- func (*GetClusterRequest) Descriptor() ([]byte, []int)deprecated
- func (m *GetClusterRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *GetClusterRequest) MarshalToVT(dAtA []byte) (int, error)
- func (m *GetClusterRequest) MarshalVT() (dAtA []byte, err error)
- func (*GetClusterRequest) ProtoMessage()
- func (x *GetClusterRequest) ProtoReflect() protoreflect.Message
- func (x *GetClusterRequest) Reset()
- func (m *GetClusterRequest) SizeVT() (n int)
- func (x *GetClusterRequest) String() string
- func (m *GetClusterRequest) UnmarshalVT(dAtA []byte) error
- type GetClusterResponse
- func (*GetClusterResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetClusterResponse) GetConfig() *v1.Cluster_Config
- func (m *GetClusterResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *GetClusterResponse) MarshalToVT(dAtA []byte) (int, error)
- func (m *GetClusterResponse) MarshalVT() (dAtA []byte, err error)
- func (*GetClusterResponse) ProtoMessage()
- func (x *GetClusterResponse) ProtoReflect() protoreflect.Message
- func (x *GetClusterResponse) Reset()
- func (m *GetClusterResponse) SizeVT() (n int)
- func (x *GetClusterResponse) String() string
- func (m *GetClusterResponse) UnmarshalVT(dAtA []byte) error
- type Notice
- func (*Notice) Descriptor() ([]byte, []int)deprecated
- func (m *Notice) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *Notice) MarshalToVT(dAtA []byte) (int, error)
- func (m *Notice) MarshalVT() (dAtA []byte, err error)
- func (*Notice) ProtoMessage()
- func (x *Notice) ProtoReflect() protoreflect.Message
- func (x *Notice) Reset()
- func (m *Notice) SizeVT() (n int)
- func (x *Notice) String() string
- func (m *Notice) UnmarshalVT(dAtA []byte) error
- type Status
- func (*Status) Descriptor() ([]byte, []int)deprecated
- func (m *Status) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *Status) MarshalToVT(dAtA []byte) (int, error)
- func (m *Status) MarshalVT() (dAtA []byte, err error)
- func (*Status) ProtoMessage()
- func (x *Status) ProtoReflect() protoreflect.Message
- func (x *Status) Reset()
- func (m *Status) SizeVT() (n int)
- func (x *Status) String() string
- func (m *Status) UnmarshalVT(dAtA []byte) error
- type UnimplementedVinceServer
- func (UnimplementedVinceServer) ApplyCluster(context.Context, *ApplyClusterRequest) (*ApplyClusterResponse, error)
- func (UnimplementedVinceServer) GetCluster(context.Context, *GetClusterRequest) (*GetClusterResponse, error)
- func (UnimplementedVinceServer) SendEvent(context.Context, *Event) (*emptypb.Empty, error)
- func (UnimplementedVinceServer) Version(context.Context, *emptypb.Empty) (*v1.Build, error)
- type UnsafeVinceServer
- type VinceClient
- type VinceServer
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLength = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflow = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroup = fmt.Errorf("proto: unexpected end of group") )
var File_vince_api_v1_api_proto protoreflect.FileDescriptor
var Vince_ServiceDesc = grpc.ServiceDesc{ ServiceName: "v1.Vince", HandlerType: (*VinceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ApplyCluster", Handler: _Vince_ApplyCluster_Handler, }, { MethodName: "GetCluster", Handler: _Vince_GetCluster_Handler, }, { MethodName: "Version", Handler: _Vince_Version_Handler, }, { MethodName: "SendEvent", Handler: _Vince_SendEvent_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "vince/api/v1/api.proto", }
Vince_ServiceDesc is the grpc.ServiceDesc for Vince service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterVinceHandler ¶
RegisterVinceHandler registers the http handlers for service Vince to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterVinceHandlerClient ¶
func RegisterVinceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client VinceClient) error
RegisterVinceHandlerClient registers the http handlers for service Vince to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "VinceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "VinceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "VinceClient" to call the correct interceptors.
func RegisterVinceHandlerFromEndpoint ¶
func RegisterVinceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterVinceHandlerFromEndpoint is same as RegisterVinceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterVinceHandlerServer ¶
func RegisterVinceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server VinceServer) error
RegisterVinceHandlerServer registers the http handlers for service Vince to "mux". UnaryRPC :call VinceServer 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 RegisterVinceHandlerFromEndpoint instead.
func RegisterVinceServer ¶
func RegisterVinceServer(s grpc.ServiceRegistrar, srv VinceServer)
Types ¶
type Account ¶
type Account struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` HashedPassword []byte `protobuf:"bytes,2,opt,name=hashed_password,json=hashedPassword,proto3" json:"hashed_password,omitempty"` // contains filtered or unexported fields }
func (*Account) Descriptor
deprecated
func (*Account) GetHashedPassword ¶
func (*Account) MarshalToSizedBufferVT ¶
func (*Account) ProtoMessage ¶
func (*Account) ProtoMessage()
func (*Account) ProtoReflect ¶
func (x *Account) ProtoReflect() protoreflect.Message
func (*Account) UnmarshalVT ¶
type ApplyClusterRequest ¶
type ApplyClusterRequest struct { Config *v1.Cluster_Config `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` // contains filtered or unexported fields }
func (*ApplyClusterRequest) Descriptor
deprecated
func (*ApplyClusterRequest) Descriptor() ([]byte, []int)
Deprecated: Use ApplyClusterRequest.ProtoReflect.Descriptor instead.
func (*ApplyClusterRequest) GetConfig ¶
func (x *ApplyClusterRequest) GetConfig() *v1.Cluster_Config
func (*ApplyClusterRequest) MarshalToSizedBufferVT ¶
func (m *ApplyClusterRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*ApplyClusterRequest) MarshalToVT ¶
func (m *ApplyClusterRequest) MarshalToVT(dAtA []byte) (int, error)
func (*ApplyClusterRequest) MarshalVT ¶
func (m *ApplyClusterRequest) MarshalVT() (dAtA []byte, err error)
func (*ApplyClusterRequest) ProtoMessage ¶
func (*ApplyClusterRequest) ProtoMessage()
func (*ApplyClusterRequest) ProtoReflect ¶
func (x *ApplyClusterRequest) ProtoReflect() protoreflect.Message
func (*ApplyClusterRequest) Reset ¶
func (x *ApplyClusterRequest) Reset()
func (*ApplyClusterRequest) SizeVT ¶
func (m *ApplyClusterRequest) SizeVT() (n int)
func (*ApplyClusterRequest) String ¶
func (x *ApplyClusterRequest) String() string
func (*ApplyClusterRequest) UnmarshalVT ¶
func (m *ApplyClusterRequest) UnmarshalVT(dAtA []byte) error
type ApplyClusterResponse ¶
type ApplyClusterResponse struct { Ok string `protobuf:"bytes,1,opt,name=ok,proto3" json:"ok,omitempty"` // contains filtered or unexported fields }
func (*ApplyClusterResponse) Descriptor
deprecated
func (*ApplyClusterResponse) Descriptor() ([]byte, []int)
Deprecated: Use ApplyClusterResponse.ProtoReflect.Descriptor instead.
func (*ApplyClusterResponse) GetOk ¶
func (x *ApplyClusterResponse) GetOk() string
func (*ApplyClusterResponse) MarshalToSizedBufferVT ¶
func (m *ApplyClusterResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*ApplyClusterResponse) MarshalToVT ¶
func (m *ApplyClusterResponse) MarshalToVT(dAtA []byte) (int, error)
func (*ApplyClusterResponse) MarshalVT ¶
func (m *ApplyClusterResponse) MarshalVT() (dAtA []byte, err error)
func (*ApplyClusterResponse) ProtoMessage ¶
func (*ApplyClusterResponse) ProtoMessage()
func (*ApplyClusterResponse) ProtoReflect ¶
func (x *ApplyClusterResponse) ProtoReflect() protoreflect.Message
func (*ApplyClusterResponse) Reset ¶
func (x *ApplyClusterResponse) Reset()
func (*ApplyClusterResponse) SizeVT ¶
func (m *ApplyClusterResponse) SizeVT() (n int)
func (*ApplyClusterResponse) String ¶
func (x *ApplyClusterResponse) String() string
func (*ApplyClusterResponse) UnmarshalVT ¶
func (m *ApplyClusterResponse) UnmarshalVT(dAtA []byte) error
type Error ¶
type Error struct { Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` Code int32 `protobuf:"varint,2,opt,name=code,proto3" json:"code,omitempty"` // contains filtered or unexported fields }
func (*Error) Descriptor
deprecated
func (*Error) MarshalToSizedBufferVT ¶
func (*Error) ProtoMessage ¶
func (*Error) ProtoMessage()
func (*Error) ProtoReflect ¶
func (x *Error) ProtoReflect() protoreflect.Message
func (*Error) UnmarshalVT ¶
type Event ¶ added in v0.0.31
type Event struct { // / EventName N string `protobuf:"bytes,1,opt,name=n,proto3" json:"n,omitempty"` Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` // Domain D string `protobuf:"bytes,3,opt,name=d,proto3" json:"d,omitempty"` // Screen width W int32 `protobuf:"varint,4,opt,name=w,proto3" json:"w,omitempty"` // Hash mode H bool `protobuf:"varint,5,opt,name=h,proto3" json:"h,omitempty"` Ip string `protobuf:"bytes,6,opt,name=ip,proto3" json:"ip,omitempty"` // user agent Ua string `protobuf:"bytes,7,opt,name=ua,proto3" json:"ua,omitempty"` // Referrer R string `protobuf:"bytes,8,opt,name=r,proto3" json:"r,omitempty"` // contains filtered or unexported fields }
func (*Event) Descriptor
deprecated
added in
v0.0.31
func (*Event) MarshalToSizedBufferVT ¶ added in v0.0.31
func (*Event) ProtoMessage ¶ added in v0.0.31
func (*Event) ProtoMessage()
func (*Event) ProtoReflect ¶ added in v0.0.31
func (x *Event) ProtoReflect() protoreflect.Message
func (*Event) UnmarshalVT ¶ added in v0.0.31
type GetClusterRequest ¶
type GetClusterRequest struct {
// contains filtered or unexported fields
}
func (*GetClusterRequest) Descriptor
deprecated
func (*GetClusterRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetClusterRequest.ProtoReflect.Descriptor instead.
func (*GetClusterRequest) MarshalToSizedBufferVT ¶
func (m *GetClusterRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*GetClusterRequest) MarshalToVT ¶
func (m *GetClusterRequest) MarshalToVT(dAtA []byte) (int, error)
func (*GetClusterRequest) MarshalVT ¶
func (m *GetClusterRequest) MarshalVT() (dAtA []byte, err error)
func (*GetClusterRequest) ProtoMessage ¶
func (*GetClusterRequest) ProtoMessage()
func (*GetClusterRequest) ProtoReflect ¶
func (x *GetClusterRequest) ProtoReflect() protoreflect.Message
func (*GetClusterRequest) Reset ¶
func (x *GetClusterRequest) Reset()
func (*GetClusterRequest) SizeVT ¶
func (m *GetClusterRequest) SizeVT() (n int)
func (*GetClusterRequest) String ¶
func (x *GetClusterRequest) String() string
func (*GetClusterRequest) UnmarshalVT ¶
func (m *GetClusterRequest) UnmarshalVT(dAtA []byte) error
type GetClusterResponse ¶
type GetClusterResponse struct { Config *v1.Cluster_Config `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` // contains filtered or unexported fields }
func (*GetClusterResponse) Descriptor
deprecated
func (*GetClusterResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetClusterResponse.ProtoReflect.Descriptor instead.
func (*GetClusterResponse) GetConfig ¶
func (x *GetClusterResponse) GetConfig() *v1.Cluster_Config
func (*GetClusterResponse) MarshalToSizedBufferVT ¶
func (m *GetClusterResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*GetClusterResponse) MarshalToVT ¶
func (m *GetClusterResponse) MarshalToVT(dAtA []byte) (int, error)
func (*GetClusterResponse) MarshalVT ¶
func (m *GetClusterResponse) MarshalVT() (dAtA []byte, err error)
func (*GetClusterResponse) ProtoMessage ¶
func (*GetClusterResponse) ProtoMessage()
func (*GetClusterResponse) ProtoReflect ¶
func (x *GetClusterResponse) ProtoReflect() protoreflect.Message
func (*GetClusterResponse) Reset ¶
func (x *GetClusterResponse) Reset()
func (*GetClusterResponse) SizeVT ¶
func (m *GetClusterResponse) SizeVT() (n int)
func (*GetClusterResponse) String ¶
func (x *GetClusterResponse) String() string
func (*GetClusterResponse) UnmarshalVT ¶
func (m *GetClusterResponse) UnmarshalVT(dAtA []byte) error
type Notice ¶
type Notice struct {
// contains filtered or unexported fields
}
func (*Notice) Descriptor
deprecated
func (*Notice) MarshalToSizedBufferVT ¶
func (*Notice) ProtoMessage ¶
func (*Notice) ProtoMessage()
func (*Notice) ProtoReflect ¶
func (x *Notice) ProtoReflect() protoreflect.Message
func (*Notice) UnmarshalVT ¶
type Status ¶
type Status struct {
// contains filtered or unexported fields
}
func (*Status) Descriptor
deprecated
func (*Status) MarshalToSizedBufferVT ¶
func (*Status) ProtoMessage ¶
func (*Status) ProtoMessage()
func (*Status) ProtoReflect ¶
func (x *Status) ProtoReflect() protoreflect.Message
func (*Status) UnmarshalVT ¶
type UnimplementedVinceServer ¶
type UnimplementedVinceServer struct { }
UnimplementedVinceServer must be embedded to have forward compatible implementations.
func (UnimplementedVinceServer) ApplyCluster ¶
func (UnimplementedVinceServer) ApplyCluster(context.Context, *ApplyClusterRequest) (*ApplyClusterResponse, error)
func (UnimplementedVinceServer) GetCluster ¶
func (UnimplementedVinceServer) GetCluster(context.Context, *GetClusterRequest) (*GetClusterResponse, error)
type UnsafeVinceServer ¶
type UnsafeVinceServer interface {
// contains filtered or unexported methods
}
UnsafeVinceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to VinceServer will result in compilation errors.
type VinceClient ¶
type VinceClient interface { ApplyCluster(ctx context.Context, in *ApplyClusterRequest, opts ...grpc.CallOption) (*ApplyClusterResponse, error) GetCluster(ctx context.Context, in *GetClusterRequest, opts ...grpc.CallOption) (*GetClusterResponse, error) Version(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*v1.Build, error) SendEvent(ctx context.Context, in *Event, opts ...grpc.CallOption) (*emptypb.Empty, error) }
VinceClient is the client API for Vince 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 NewVinceClient ¶
func NewVinceClient(cc grpc.ClientConnInterface) VinceClient
type VinceServer ¶
type VinceServer interface { ApplyCluster(context.Context, *ApplyClusterRequest) (*ApplyClusterResponse, error) GetCluster(context.Context, *GetClusterRequest) (*GetClusterResponse, error) Version(context.Context, *emptypb.Empty) (*v1.Build, error) SendEvent(context.Context, *Event) (*emptypb.Empty, error) // contains filtered or unexported methods }
VinceServer is the server API for Vince service. All implementations must embed UnimplementedVinceServer for forward compatibility