Documentation ¶
Index ¶
- Variables
- func ErrDeletePluginHasBeenDepended() errors.Error
- func ErrInternalQueryPluginOpenapi() errors.Error
- func ErrInternalStore() errors.Error
- func ErrInvalidArgument() errors.Error
- func ErrListPlugin() errors.Error
- func ErrPluginAlreadyExists() errors.Error
- func ErrPluginNotFound() errors.Error
- func ErrPluginRouteNotFound() errors.Error
- func ErrUnknown() errors.Error
- func RegisterPluginHTTPServer(container *go_restful.Container, srv PluginHTTPServer)
- func RegisterPluginServer(s grpc.ServiceRegistrar, srv PluginServer)
- type DeletePluginRequest
- func (*DeletePluginRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DeletePluginRequest) GetId() string
- func (*DeletePluginRequest) ProtoMessage()
- func (x *DeletePluginRequest) ProtoReflect() protoreflect.Message
- func (x *DeletePluginRequest) Reset()
- func (x *DeletePluginRequest) String() string
- type DeletePluginResponse
- func (*DeletePluginResponse) Descriptor() ([]byte, []int)deprecated
- func (x *DeletePluginResponse) GetPlugin() *PluginObject
- func (*DeletePluginResponse) ProtoMessage()
- func (x *DeletePluginResponse) ProtoReflect() protoreflect.Message
- func (x *DeletePluginResponse) Reset()
- func (x *DeletePluginResponse) String() string
- type Error
- type GetPluginRequest
- type GetPluginResponse
- func (*GetPluginResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetPluginResponse) GetPlugin() *PluginObject
- func (*GetPluginResponse) ProtoMessage()
- func (x *GetPluginResponse) ProtoReflect() protoreflect.Message
- func (x *GetPluginResponse) Reset()
- func (x *GetPluginResponse) String() string
- type ListPluginResponse
- func (*ListPluginResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListPluginResponse) GetPluginList() []*PluginObject
- func (*ListPluginResponse) ProtoMessage()
- func (x *ListPluginResponse) ProtoReflect() protoreflect.Message
- func (x *ListPluginResponse) Reset()
- func (x *ListPluginResponse) String() string
- type PluginClient
- type PluginHTTPHandler
- func (h *PluginHTTPHandler) DeletePlugin(req *go_restful.Request, resp *go_restful.Response)
- func (h *PluginHTTPHandler) GetPlugin(req *go_restful.Request, resp *go_restful.Response)
- func (h *PluginHTTPHandler) ListPlugin(req *go_restful.Request, resp *go_restful.Response)
- func (h *PluginHTTPHandler) RegisterPlugin(req *go_restful.Request, resp *go_restful.Response)
- type PluginHTTPServer
- type PluginObject
- func (*PluginObject) Descriptor() ([]byte, []int)deprecated
- func (x *PluginObject) GetActiveTenantes() []string
- func (x *PluginObject) GetAddonsPoint() []*v1.AddonsPoint
- func (x *PluginObject) GetId() string
- func (x *PluginObject) GetImplementedPlugin() []*v1.ImplementedPlugin
- func (x *PluginObject) GetPluginVersion() string
- func (x *PluginObject) GetRegisterAddons() []*RegisterAddons
- func (x *PluginObject) GetRegisterTimestamp() int64
- func (x *PluginObject) GetSecret() string
- func (x *PluginObject) GetTkeelVersion() string
- func (*PluginObject) ProtoMessage()
- func (x *PluginObject) ProtoReflect() protoreflect.Message
- func (x *PluginObject) Reset()
- func (x *PluginObject) String() string
- type PluginServer
- type RegisterAddons
- func (*RegisterAddons) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterAddons) GetAddons() string
- func (x *RegisterAddons) GetUpstream() string
- func (*RegisterAddons) ProtoMessage()
- func (x *RegisterAddons) ProtoReflect() protoreflect.Message
- func (x *RegisterAddons) Reset()
- func (x *RegisterAddons) String() string
- type RegisterPluginRequest
- func (*RegisterPluginRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterPluginRequest) GetId() string
- func (x *RegisterPluginRequest) GetSecret() string
- func (*RegisterPluginRequest) ProtoMessage()
- func (x *RegisterPluginRequest) ProtoReflect() protoreflect.Message
- func (x *RegisterPluginRequest) Reset()
- func (x *RegisterPluginRequest) String() string
- type UnimplementedPluginServer
- func (UnimplementedPluginServer) DeletePlugin(context.Context, *DeletePluginRequest) (*DeletePluginResponse, error)
- func (UnimplementedPluginServer) GetPlugin(context.Context, *GetPluginRequest) (*GetPluginResponse, error)
- func (UnimplementedPluginServer) ListPlugin(context.Context, *emptypb.Empty) (*ListPluginResponse, error)
- func (UnimplementedPluginServer) RegisterPlugin(context.Context, *RegisterPluginRequest) (*emptypb.Empty, error)
- type UnsafePluginServer
Constants ¶
This section is empty.
Variables ¶
var ( Error_name = map[int32]string{ 0: "ERR_UNKNOWN", 1: "ERR_PLUGIN_NOT_FOUND", 2: "ERR_PLUGIN_ROUTE_NOT_FOUND", 3: "ERR_PLUGIN_ALREADY_EXISTS", 4: "ERR_LIST_PLUGIN", 5: "ERR_INVALID_ARGUMENT", 6: "ERR_INTERNAL_QUERY_PLUGIN_OPENAPI", 7: "ERR_INTERNAL_STORE", 8: "ERR_DELETE_PLUGIN_HAS_BEEN_DEPENDED", } Error_value = map[string]int32{ "ERR_UNKNOWN": 0, "ERR_PLUGIN_NOT_FOUND": 1, "ERR_PLUGIN_ROUTE_NOT_FOUND": 2, "ERR_PLUGIN_ALREADY_EXISTS": 3, "ERR_LIST_PLUGIN": 4, "ERR_INVALID_ARGUMENT": 5, "ERR_INTERNAL_QUERY_PLUGIN_OPENAPI": 6, "ERR_INTERNAL_STORE": 7, "ERR_DELETE_PLUGIN_HAS_BEEN_DEPENDED": 8, } )
Enum value maps for Error.
var File_api_plugin_v1_error_proto protoreflect.FileDescriptor
var File_api_plugin_v1_plugin_proto protoreflect.FileDescriptor
var Plugin_ServiceDesc = grpc.ServiceDesc{ ServiceName: "api.plugin.v1.Plugin", HandlerType: (*PluginServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "RegisterPlugin", Handler: _Plugin_RegisterPlugin_Handler, }, { MethodName: "DeletePlugin", Handler: _Plugin_DeletePlugin_Handler, }, { MethodName: "GetPlugin", Handler: _Plugin_GetPlugin_Handler, }, { MethodName: "ListPlugin", Handler: _Plugin_ListPlugin_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/plugin/v1/plugin.proto", }
Plugin_ServiceDesc is the grpc.ServiceDesc for Plugin service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func ErrInternalStore ¶
func ErrInvalidArgument ¶
func ErrListPlugin ¶
func ErrPluginAlreadyExists ¶
func ErrPluginNotFound ¶
func ErrPluginRouteNotFound ¶
func ErrUnknown ¶
func RegisterPluginHTTPServer ¶
func RegisterPluginHTTPServer(container *go_restful.Container, srv PluginHTTPServer)
func RegisterPluginServer ¶
func RegisterPluginServer(s grpc.ServiceRegistrar, srv PluginServer)
Types ¶
type DeletePluginRequest ¶
type DeletePluginRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*DeletePluginRequest) Descriptor
deprecated
func (*DeletePluginRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeletePluginRequest.ProtoReflect.Descriptor instead.
func (*DeletePluginRequest) GetId ¶
func (x *DeletePluginRequest) GetId() string
func (*DeletePluginRequest) ProtoMessage ¶
func (*DeletePluginRequest) ProtoMessage()
func (*DeletePluginRequest) ProtoReflect ¶
func (x *DeletePluginRequest) ProtoReflect() protoreflect.Message
func (*DeletePluginRequest) Reset ¶
func (x *DeletePluginRequest) Reset()
func (*DeletePluginRequest) String ¶
func (x *DeletePluginRequest) String() string
type DeletePluginResponse ¶
type DeletePluginResponse struct { Plugin *PluginObject `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"` // contains filtered or unexported fields }
func (*DeletePluginResponse) Descriptor
deprecated
func (*DeletePluginResponse) Descriptor() ([]byte, []int)
Deprecated: Use DeletePluginResponse.ProtoReflect.Descriptor instead.
func (*DeletePluginResponse) GetPlugin ¶
func (x *DeletePluginResponse) GetPlugin() *PluginObject
func (*DeletePluginResponse) ProtoMessage ¶
func (*DeletePluginResponse) ProtoMessage()
func (*DeletePluginResponse) ProtoReflect ¶
func (x *DeletePluginResponse) ProtoReflect() protoreflect.Message
func (*DeletePluginResponse) Reset ¶
func (x *DeletePluginResponse) Reset()
func (*DeletePluginResponse) String ¶
func (x *DeletePluginResponse) String() string
type Error ¶
type Error int32
@plugins=protoc-gen-go-errors 错误
const ( // 未知类型 // @code=UNKNOWN Error_ERR_UNKNOWN Error = 0 // 找不到 Plugin // @code=NOT_FOUND Error_ERR_PLUGIN_NOT_FOUND Error = 1 // 找不到 Plugin Route // @code=NOT_FOUND Error_ERR_PLUGIN_ROUTE_NOT_FOUND Error = 2 // 找不到 Plugin Route // @code=ALREADY_EXISTS Error_ERR_PLUGIN_ALREADY_EXISTS Error = 3 // 获取 Plugin 列表数据出错 // @code=INTERNAL Error_ERR_LIST_PLUGIN Error = 4 // 请求参数无效 // @code=INVALID_ARGUMENT Error_ERR_INVALID_ARGUMENT Error = 5 // 请求 Plugin OPENAPI 错误 // @code=INTERNAL Error_ERR_INTERNAL_QUERY_PLUGIN_OPENAPI Error = 6 // 请求后端存储错误 // @code=INTERNAL Error_ERR_INTERNAL_STORE Error = 7 // 删除的插件被依赖 // @code=INTERNAL Error_ERR_DELETE_PLUGIN_HAS_BEEN_DEPENDED Error = 8 )
func (Error) Descriptor ¶
func (Error) Descriptor() protoreflect.EnumDescriptor
func (Error) EnumDescriptor
deprecated
func (Error) Number ¶
func (x Error) Number() protoreflect.EnumNumber
func (Error) Type ¶
func (Error) Type() protoreflect.EnumType
type GetPluginRequest ¶
type GetPluginRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*GetPluginRequest) Descriptor
deprecated
func (*GetPluginRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetPluginRequest.ProtoReflect.Descriptor instead.
func (*GetPluginRequest) GetId ¶
func (x *GetPluginRequest) GetId() string
func (*GetPluginRequest) ProtoMessage ¶
func (*GetPluginRequest) ProtoMessage()
func (*GetPluginRequest) ProtoReflect ¶
func (x *GetPluginRequest) ProtoReflect() protoreflect.Message
func (*GetPluginRequest) Reset ¶
func (x *GetPluginRequest) Reset()
func (*GetPluginRequest) String ¶
func (x *GetPluginRequest) String() string
type GetPluginResponse ¶
type GetPluginResponse struct { Plugin *PluginObject `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"` // contains filtered or unexported fields }
func (*GetPluginResponse) Descriptor
deprecated
func (*GetPluginResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetPluginResponse.ProtoReflect.Descriptor instead.
func (*GetPluginResponse) GetPlugin ¶
func (x *GetPluginResponse) GetPlugin() *PluginObject
func (*GetPluginResponse) ProtoMessage ¶
func (*GetPluginResponse) ProtoMessage()
func (*GetPluginResponse) ProtoReflect ¶
func (x *GetPluginResponse) ProtoReflect() protoreflect.Message
func (*GetPluginResponse) Reset ¶
func (x *GetPluginResponse) Reset()
func (*GetPluginResponse) String ¶
func (x *GetPluginResponse) String() string
type ListPluginResponse ¶
type ListPluginResponse struct { PluginList []*PluginObject `protobuf:"bytes,1,rep,name=pluginList,proto3" json:"pluginList,omitempty"` // contains filtered or unexported fields }
func (*ListPluginResponse) Descriptor
deprecated
func (*ListPluginResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListPluginResponse.ProtoReflect.Descriptor instead.
func (*ListPluginResponse) GetPluginList ¶
func (x *ListPluginResponse) GetPluginList() []*PluginObject
func (*ListPluginResponse) ProtoMessage ¶
func (*ListPluginResponse) ProtoMessage()
func (*ListPluginResponse) ProtoReflect ¶
func (x *ListPluginResponse) ProtoReflect() protoreflect.Message
func (*ListPluginResponse) Reset ¶
func (x *ListPluginResponse) Reset()
func (*ListPluginResponse) String ¶
func (x *ListPluginResponse) String() string
type PluginClient ¶
type PluginClient interface { RegisterPlugin(ctx context.Context, in *RegisterPluginRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) DeletePlugin(ctx context.Context, in *DeletePluginRequest, opts ...grpc.CallOption) (*DeletePluginResponse, error) GetPlugin(ctx context.Context, in *GetPluginRequest, opts ...grpc.CallOption) (*GetPluginResponse, error) ListPlugin(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ListPluginResponse, error) }
PluginClient is the client API for Plugin 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 NewPluginClient ¶
func NewPluginClient(cc grpc.ClientConnInterface) PluginClient
type PluginHTTPHandler ¶
type PluginHTTPHandler struct {
// contains filtered or unexported fields
}
func (*PluginHTTPHandler) DeletePlugin ¶
func (h *PluginHTTPHandler) DeletePlugin(req *go_restful.Request, resp *go_restful.Response)
func (*PluginHTTPHandler) GetPlugin ¶
func (h *PluginHTTPHandler) GetPlugin(req *go_restful.Request, resp *go_restful.Response)
func (*PluginHTTPHandler) ListPlugin ¶
func (h *PluginHTTPHandler) ListPlugin(req *go_restful.Request, resp *go_restful.Response)
func (*PluginHTTPHandler) RegisterPlugin ¶
func (h *PluginHTTPHandler) RegisterPlugin(req *go_restful.Request, resp *go_restful.Response)
type PluginHTTPServer ¶
type PluginHTTPServer interface { DeletePlugin(context.Context, *DeletePluginRequest) (*DeletePluginResponse, error) GetPlugin(context.Context, *GetPluginRequest) (*GetPluginResponse, error) ListPlugin(context.Context, *emptypb.Empty) (*ListPluginResponse, error) RegisterPlugin(context.Context, *RegisterPluginRequest) (*emptypb.Empty, error) }
type PluginObject ¶
type PluginObject struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // plugin id. PluginVersion string `protobuf:"bytes,2,opt,name=plugin_version,json=pluginVersion,proto3" json:"plugin_version,omitempty"` // plugin version. TkeelVersion string `protobuf:"bytes,3,opt,name=tkeel_version,json=tkeelVersion,proto3" json:"tkeel_version,omitempty"` // plugin depend tkeel version. AddonsPoint []*v1.AddonsPoint `protobuf:"bytes,4,rep,name=addons_point,json=addonsPoint,proto3" json:"addons_point,omitempty"` // plugin declares addons. ImplementedPlugin []*v1.ImplementedPlugin `protobuf:"bytes,5,rep,name=implemented_plugin,json=implementedPlugin,proto3" json:"implemented_plugin,omitempty"` // plugin implemented plugin list. Secret string `protobuf:"bytes,6,opt,name=secret,proto3" json:"secret,omitempty"` // plugin registered secret. RegisterTimestamp int64 `protobuf:"varint,7,opt,name=register_timestamp,json=registerTimestamp,proto3" json:"register_timestamp,omitempty"` // register timestamp. ActiveTenantes []string `protobuf:"bytes,8,rep,name=active_tenantes,json=activeTenantes,proto3" json:"active_tenantes,omitempty"` // active tenant's id list. RegisterAddons []*RegisterAddons `protobuf:"bytes,9,rep,name=register_addons,json=registerAddons,proto3" json:"register_addons,omitempty"` // register addons router. // contains filtered or unexported fields }
* plugin object.
func (*PluginObject) Descriptor
deprecated
func (*PluginObject) Descriptor() ([]byte, []int)
Deprecated: Use PluginObject.ProtoReflect.Descriptor instead.
func (*PluginObject) GetActiveTenantes ¶
func (x *PluginObject) GetActiveTenantes() []string
func (*PluginObject) GetAddonsPoint ¶
func (x *PluginObject) GetAddonsPoint() []*v1.AddonsPoint
func (*PluginObject) GetId ¶
func (x *PluginObject) GetId() string
func (*PluginObject) GetImplementedPlugin ¶
func (x *PluginObject) GetImplementedPlugin() []*v1.ImplementedPlugin
func (*PluginObject) GetPluginVersion ¶
func (x *PluginObject) GetPluginVersion() string
func (*PluginObject) GetRegisterAddons ¶
func (x *PluginObject) GetRegisterAddons() []*RegisterAddons
func (*PluginObject) GetRegisterTimestamp ¶
func (x *PluginObject) GetRegisterTimestamp() int64
func (*PluginObject) GetSecret ¶
func (x *PluginObject) GetSecret() string
func (*PluginObject) GetTkeelVersion ¶
func (x *PluginObject) GetTkeelVersion() string
func (*PluginObject) ProtoMessage ¶
func (*PluginObject) ProtoMessage()
func (*PluginObject) ProtoReflect ¶
func (x *PluginObject) ProtoReflect() protoreflect.Message
func (*PluginObject) Reset ¶
func (x *PluginObject) Reset()
func (*PluginObject) String ¶
func (x *PluginObject) String() string
type PluginServer ¶
type PluginServer interface { RegisterPlugin(context.Context, *RegisterPluginRequest) (*emptypb.Empty, error) DeletePlugin(context.Context, *DeletePluginRequest) (*DeletePluginResponse, error) GetPlugin(context.Context, *GetPluginRequest) (*GetPluginResponse, error) ListPlugin(context.Context, *emptypb.Empty) (*ListPluginResponse, error) // contains filtered or unexported methods }
PluginServer is the server API for Plugin service. All implementations must embed UnimplementedPluginServer for forward compatibility
type RegisterAddons ¶
type RegisterAddons struct { Addons string `protobuf:"bytes,1,opt,name=addons,proto3" json:"addons,omitempty"` // addons name. Upstream string `protobuf:"bytes,2,opt,name=upstream,proto3" json:"upstream,omitempty"` // upstream path. // contains filtered or unexported fields }
* Register Addons.
func (*RegisterAddons) Descriptor
deprecated
func (*RegisterAddons) Descriptor() ([]byte, []int)
Deprecated: Use RegisterAddons.ProtoReflect.Descriptor instead.
func (*RegisterAddons) GetAddons ¶
func (x *RegisterAddons) GetAddons() string
func (*RegisterAddons) GetUpstream ¶
func (x *RegisterAddons) GetUpstream() string
func (*RegisterAddons) ProtoMessage ¶
func (*RegisterAddons) ProtoMessage()
func (*RegisterAddons) ProtoReflect ¶
func (x *RegisterAddons) ProtoReflect() protoreflect.Message
func (*RegisterAddons) Reset ¶
func (x *RegisterAddons) Reset()
func (*RegisterAddons) String ¶
func (x *RegisterAddons) String() string
type RegisterPluginRequest ¶
type RegisterPluginRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Secret string `protobuf:"bytes,2,opt,name=secret,proto3" json:"secret,omitempty"` // contains filtered or unexported fields }
func (*RegisterPluginRequest) Descriptor
deprecated
func (*RegisterPluginRequest) Descriptor() ([]byte, []int)
Deprecated: Use RegisterPluginRequest.ProtoReflect.Descriptor instead.
func (*RegisterPluginRequest) GetId ¶
func (x *RegisterPluginRequest) GetId() string
func (*RegisterPluginRequest) GetSecret ¶
func (x *RegisterPluginRequest) GetSecret() string
func (*RegisterPluginRequest) ProtoMessage ¶
func (*RegisterPluginRequest) ProtoMessage()
func (*RegisterPluginRequest) ProtoReflect ¶
func (x *RegisterPluginRequest) ProtoReflect() protoreflect.Message
func (*RegisterPluginRequest) Reset ¶
func (x *RegisterPluginRequest) Reset()
func (*RegisterPluginRequest) String ¶
func (x *RegisterPluginRequest) String() string
type UnimplementedPluginServer ¶
type UnimplementedPluginServer struct { }
UnimplementedPluginServer must be embedded to have forward compatible implementations.
func (UnimplementedPluginServer) DeletePlugin ¶
func (UnimplementedPluginServer) DeletePlugin(context.Context, *DeletePluginRequest) (*DeletePluginResponse, error)
func (UnimplementedPluginServer) GetPlugin ¶
func (UnimplementedPluginServer) GetPlugin(context.Context, *GetPluginRequest) (*GetPluginResponse, error)
func (UnimplementedPluginServer) ListPlugin ¶
func (UnimplementedPluginServer) ListPlugin(context.Context, *emptypb.Empty) (*ListPluginResponse, error)
func (UnimplementedPluginServer) RegisterPlugin ¶
func (UnimplementedPluginServer) RegisterPlugin(context.Context, *RegisterPluginRequest) (*emptypb.Empty, error)
type UnsafePluginServer ¶
type UnsafePluginServer interface {
// contains filtered or unexported methods
}
UnsafePluginServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PluginServer will result in compilation errors.