Documentation ¶
Overview ¶
Package v1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterGatewayDAdminAPIServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterGatewayDAdminAPIServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ...) error
- func RegisterGatewayDAdminAPIServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterGatewayDAdminAPIServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, ...) error
- func RegisterGatewayDAdminAPIServiceServer(s grpc.ServiceRegistrar, srv GatewayDAdminAPIServiceServer)
- type GatewayDAdminAPIServiceClient
- type GatewayDAdminAPIServiceServer
- type PluginConfig
- func (*PluginConfig) Descriptor() ([]byte, []int)deprecated
- func (x *PluginConfig) GetAuthors() []string
- func (x *PluginConfig) GetCategories() []string
- func (x *PluginConfig) GetConfig() map[string]string
- func (x *PluginConfig) GetDescription() string
- func (x *PluginConfig) GetHooks() []int32
- func (x *PluginConfig) GetId() *PluginID
- func (x *PluginConfig) GetLicense() string
- func (x *PluginConfig) GetProjectUrl() string
- func (x *PluginConfig) GetRequires() map[string]string
- func (x *PluginConfig) GetTags() []string
- func (*PluginConfig) ProtoMessage()
- func (x *PluginConfig) ProtoReflect() protoreflect.Message
- func (x *PluginConfig) Reset()
- func (x *PluginConfig) String() string
- type PluginConfigs
- type PluginID
- func (*PluginID) Descriptor() ([]byte, []int)deprecated
- func (x *PluginID) GetChecksum() string
- func (x *PluginID) GetName() string
- func (x *PluginID) GetRemoteUrl() string
- func (x *PluginID) GetVersion() string
- func (*PluginID) ProtoMessage()
- func (x *PluginID) ProtoReflect() protoreflect.Message
- func (x *PluginID) Reset()
- func (x *PluginID) String() string
- type PluginName
- type UnimplementedGatewayDAdminAPIServiceServer
- func (UnimplementedGatewayDAdminAPIServiceServer) GetGlobalConfig(context.Context, *emptypb.Empty) (*structpb.Struct, error)
- func (UnimplementedGatewayDAdminAPIServiceServer) GetPluginConfig(context.Context, *emptypb.Empty) (*structpb.Struct, error)
- func (UnimplementedGatewayDAdminAPIServiceServer) GetPlugins(context.Context, *emptypb.Empty) (*PluginConfigs, error)
- func (UnimplementedGatewayDAdminAPIServiceServer) GetPools(context.Context, *emptypb.Empty) (*structpb.Struct, error)
- func (UnimplementedGatewayDAdminAPIServiceServer) GetProxies(context.Context, *emptypb.Empty) (*structpb.Struct, error)
- func (UnimplementedGatewayDAdminAPIServiceServer) GetServers(context.Context, *emptypb.Empty) (*structpb.Struct, error)
- func (UnimplementedGatewayDAdminAPIServiceServer) Version(context.Context, *emptypb.Empty) (*VersionResponse, error)
- type UnsafeGatewayDAdminAPIServiceServer
- type VersionResponse
- func (*VersionResponse) Descriptor() ([]byte, []int)deprecated
- func (x *VersionResponse) GetVersion() string
- func (x *VersionResponse) GetVersionInfo() string
- func (*VersionResponse) ProtoMessage()
- func (x *VersionResponse) ProtoReflect() protoreflect.Message
- func (x *VersionResponse) Reset()
- func (x *VersionResponse) String() string
Constants ¶
const ( GatewayDAdminAPIService_Version_FullMethodName = "/api.v1.GatewayDAdminAPIService/Version" GatewayDAdminAPIService_GetGlobalConfig_FullMethodName = "/api.v1.GatewayDAdminAPIService/GetGlobalConfig" GatewayDAdminAPIService_GetPluginConfig_FullMethodName = "/api.v1.GatewayDAdminAPIService/GetPluginConfig" GatewayDAdminAPIService_GetPlugins_FullMethodName = "/api.v1.GatewayDAdminAPIService/GetPlugins" GatewayDAdminAPIService_GetPools_FullMethodName = "/api.v1.GatewayDAdminAPIService/GetPools" GatewayDAdminAPIService_GetProxies_FullMethodName = "/api.v1.GatewayDAdminAPIService/GetProxies" GatewayDAdminAPIService_GetServers_FullMethodName = "/api.v1.GatewayDAdminAPIService/GetServers" )
Variables ¶
var File_api_v1_api_proto protoreflect.FileDescriptor
var GatewayDAdminAPIService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "api.v1.GatewayDAdminAPIService", HandlerType: (*GatewayDAdminAPIServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Version", Handler: _GatewayDAdminAPIService_Version_Handler, }, { MethodName: "GetGlobalConfig", Handler: _GatewayDAdminAPIService_GetGlobalConfig_Handler, }, { MethodName: "GetPluginConfig", Handler: _GatewayDAdminAPIService_GetPluginConfig_Handler, }, { MethodName: "GetPlugins", Handler: _GatewayDAdminAPIService_GetPlugins_Handler, }, { MethodName: "GetPools", Handler: _GatewayDAdminAPIService_GetPools_Handler, }, { MethodName: "GetProxies", Handler: _GatewayDAdminAPIService_GetProxies_Handler, }, { MethodName: "GetServers", Handler: _GatewayDAdminAPIService_GetServers_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/v1/api.proto", }
GatewayDAdminAPIService_ServiceDesc is the grpc.ServiceDesc for GatewayDAdminAPIService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterGatewayDAdminAPIServiceHandler ¶
func RegisterGatewayDAdminAPIServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterGatewayDAdminAPIServiceHandler registers the http handlers for service GatewayDAdminAPIService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterGatewayDAdminAPIServiceHandlerClient ¶
func RegisterGatewayDAdminAPIServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client GatewayDAdminAPIServiceClient) error
RegisterGatewayDAdminAPIServiceHandlerClient registers the http handlers for service GatewayDAdminAPIService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "GatewayDAdminAPIServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "GatewayDAdminAPIServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "GatewayDAdminAPIServiceClient" to call the correct interceptors.
func RegisterGatewayDAdminAPIServiceHandlerFromEndpoint ¶
func RegisterGatewayDAdminAPIServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterGatewayDAdminAPIServiceHandlerFromEndpoint is same as RegisterGatewayDAdminAPIServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterGatewayDAdminAPIServiceHandlerServer ¶
func RegisterGatewayDAdminAPIServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server GatewayDAdminAPIServiceServer) error
RegisterGatewayDAdminAPIServiceHandlerServer registers the http handlers for service GatewayDAdminAPIService to "mux". UnaryRPC :call GatewayDAdminAPIServiceServer 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 RegisterGatewayDAdminAPIServiceHandlerFromEndpoint instead.
func RegisterGatewayDAdminAPIServiceServer ¶
func RegisterGatewayDAdminAPIServiceServer(s grpc.ServiceRegistrar, srv GatewayDAdminAPIServiceServer)
Types ¶
type GatewayDAdminAPIServiceClient ¶
type GatewayDAdminAPIServiceClient interface { // Version returns the version of the GatewayD. Version(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*VersionResponse, error) // GetGlobalConfig returns the global configuration of the GatewayD. GetGlobalConfig(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*structpb.Struct, error) // GetPluginConfig returns the configuration of the specified plugin. GetPluginConfig(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*structpb.Struct, error) // GetPlugins returns the list of plugins installed on the GatewayD. GetPlugins(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*PluginConfigs, error) // GetPools returns the list of pools configured on the GatewayD. GetPools(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*structpb.Struct, error) // GetProxies returns the list of proxies configured on the GatewayD. GetProxies(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*structpb.Struct, error) // GetServers returns the list of servers configured on the GatewayD. GetServers(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*structpb.Struct, error) }
GatewayDAdminAPIServiceClient is the client API for GatewayDAdminAPIService 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 NewGatewayDAdminAPIServiceClient ¶
func NewGatewayDAdminAPIServiceClient(cc grpc.ClientConnInterface) GatewayDAdminAPIServiceClient
type GatewayDAdminAPIServiceServer ¶
type GatewayDAdminAPIServiceServer interface { // Version returns the version of the GatewayD. Version(context.Context, *emptypb.Empty) (*VersionResponse, error) // GetGlobalConfig returns the global configuration of the GatewayD. GetGlobalConfig(context.Context, *emptypb.Empty) (*structpb.Struct, error) // GetPluginConfig returns the configuration of the specified plugin. GetPluginConfig(context.Context, *emptypb.Empty) (*structpb.Struct, error) // GetPlugins returns the list of plugins installed on the GatewayD. GetPlugins(context.Context, *emptypb.Empty) (*PluginConfigs, error) // GetPools returns the list of pools configured on the GatewayD. GetPools(context.Context, *emptypb.Empty) (*structpb.Struct, error) // GetProxies returns the list of proxies configured on the GatewayD. GetProxies(context.Context, *emptypb.Empty) (*structpb.Struct, error) // GetServers returns the list of servers configured on the GatewayD. GetServers(context.Context, *emptypb.Empty) (*structpb.Struct, error) // contains filtered or unexported methods }
GatewayDAdminAPIServiceServer is the server API for GatewayDAdminAPIService service. All implementations must embed UnimplementedGatewayDAdminAPIServiceServer for forward compatibility
type PluginConfig ¶
type PluginConfig struct { Id *PluginID `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` Authors []string `protobuf:"bytes,3,rep,name=authors,proto3" json:"authors,omitempty"` License string `protobuf:"bytes,4,opt,name=license,proto3" json:"license,omitempty"` ProjectUrl string `protobuf:"bytes,5,opt,name=project_url,json=projectUrl,proto3" json:"project_url,omitempty"` // internal and external config options Config map[string]string `` /* 153-byte string literal not displayed */ // hooks it attaches to Hooks []int32 `protobuf:"varint,7,rep,packed,name=hooks,proto3" json:"hooks,omitempty"` // required plugins Requires map[string]string `` /* 157-byte string literal not displayed */ Tags []string `protobuf:"bytes,9,rep,name=tags,proto3" json:"tags,omitempty"` Categories []string `protobuf:"bytes,10,rep,name=categories,proto3" json:"categories,omitempty"` // contains filtered or unexported fields }
func (*PluginConfig) Descriptor
deprecated
func (*PluginConfig) Descriptor() ([]byte, []int)
Deprecated: Use PluginConfig.ProtoReflect.Descriptor instead.
func (*PluginConfig) GetAuthors ¶
func (x *PluginConfig) GetAuthors() []string
func (*PluginConfig) GetCategories ¶
func (x *PluginConfig) GetCategories() []string
func (*PluginConfig) GetConfig ¶
func (x *PluginConfig) GetConfig() map[string]string
func (*PluginConfig) GetDescription ¶
func (x *PluginConfig) GetDescription() string
func (*PluginConfig) GetHooks ¶
func (x *PluginConfig) GetHooks() []int32
func (*PluginConfig) GetId ¶
func (x *PluginConfig) GetId() *PluginID
func (*PluginConfig) GetLicense ¶
func (x *PluginConfig) GetLicense() string
func (*PluginConfig) GetProjectUrl ¶
func (x *PluginConfig) GetProjectUrl() string
func (*PluginConfig) GetRequires ¶
func (x *PluginConfig) GetRequires() map[string]string
func (*PluginConfig) GetTags ¶
func (x *PluginConfig) GetTags() []string
func (*PluginConfig) ProtoMessage ¶
func (*PluginConfig) ProtoMessage()
func (*PluginConfig) ProtoReflect ¶
func (x *PluginConfig) ProtoReflect() protoreflect.Message
func (*PluginConfig) Reset ¶
func (x *PluginConfig) Reset()
func (*PluginConfig) String ¶
func (x *PluginConfig) String() string
type PluginConfigs ¶
type PluginConfigs struct { Configs []*PluginConfig `protobuf:"bytes,1,rep,name=configs,proto3" json:"configs,omitempty"` // contains filtered or unexported fields }
func (*PluginConfigs) Descriptor
deprecated
func (*PluginConfigs) Descriptor() ([]byte, []int)
Deprecated: Use PluginConfigs.ProtoReflect.Descriptor instead.
func (*PluginConfigs) GetConfigs ¶
func (x *PluginConfigs) GetConfigs() []*PluginConfig
func (*PluginConfigs) ProtoMessage ¶
func (*PluginConfigs) ProtoMessage()
func (*PluginConfigs) ProtoReflect ¶
func (x *PluginConfigs) ProtoReflect() protoreflect.Message
func (*PluginConfigs) Reset ¶
func (x *PluginConfigs) Reset()
func (*PluginConfigs) String ¶
func (x *PluginConfigs) String() string
type PluginID ¶
type PluginID struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` RemoteUrl string `protobuf:"bytes,3,opt,name=remote_url,json=remoteUrl,proto3" json:"remote_url,omitempty"` Checksum string `protobuf:"bytes,4,opt,name=checksum,proto3" json:"checksum,omitempty"` // contains filtered or unexported fields }
func (*PluginID) Descriptor
deprecated
func (*PluginID) GetChecksum ¶
func (*PluginID) GetRemoteUrl ¶
func (*PluginID) GetVersion ¶
func (*PluginID) ProtoMessage ¶
func (*PluginID) ProtoMessage()
func (*PluginID) ProtoReflect ¶
func (x *PluginID) ProtoReflect() protoreflect.Message
type PluginName ¶
type PluginName struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*PluginName) Descriptor
deprecated
func (*PluginName) Descriptor() ([]byte, []int)
Deprecated: Use PluginName.ProtoReflect.Descriptor instead.
func (*PluginName) GetName ¶
func (x *PluginName) GetName() string
func (*PluginName) ProtoMessage ¶
func (*PluginName) ProtoMessage()
func (*PluginName) ProtoReflect ¶
func (x *PluginName) ProtoReflect() protoreflect.Message
func (*PluginName) Reset ¶
func (x *PluginName) Reset()
func (*PluginName) String ¶
func (x *PluginName) String() string
type UnimplementedGatewayDAdminAPIServiceServer ¶
type UnimplementedGatewayDAdminAPIServiceServer struct { }
UnimplementedGatewayDAdminAPIServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedGatewayDAdminAPIServiceServer) GetGlobalConfig ¶
func (UnimplementedGatewayDAdminAPIServiceServer) GetPluginConfig ¶
func (UnimplementedGatewayDAdminAPIServiceServer) GetPlugins ¶
func (UnimplementedGatewayDAdminAPIServiceServer) GetPlugins(context.Context, *emptypb.Empty) (*PluginConfigs, error)
func (UnimplementedGatewayDAdminAPIServiceServer) GetProxies ¶
func (UnimplementedGatewayDAdminAPIServiceServer) GetServers ¶
func (UnimplementedGatewayDAdminAPIServiceServer) Version ¶
func (UnimplementedGatewayDAdminAPIServiceServer) Version(context.Context, *emptypb.Empty) (*VersionResponse, error)
type UnsafeGatewayDAdminAPIServiceServer ¶
type UnsafeGatewayDAdminAPIServiceServer interface {
// contains filtered or unexported methods
}
UnsafeGatewayDAdminAPIServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GatewayDAdminAPIServiceServer will result in compilation errors.
type VersionResponse ¶
type VersionResponse struct { Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` VersionInfo string `protobuf:"bytes,2,opt,name=version_info,json=versionInfo,proto3" json:"version_info,omitempty"` // contains filtered or unexported fields }
func (*VersionResponse) Descriptor
deprecated
func (*VersionResponse) Descriptor() ([]byte, []int)
Deprecated: Use VersionResponse.ProtoReflect.Descriptor instead.
func (*VersionResponse) GetVersion ¶
func (x *VersionResponse) GetVersion() string
func (*VersionResponse) GetVersionInfo ¶
func (x *VersionResponse) GetVersionInfo() string
func (*VersionResponse) ProtoMessage ¶
func (*VersionResponse) ProtoMessage()
func (*VersionResponse) ProtoReflect ¶
func (x *VersionResponse) ProtoReflect() protoreflect.Message
func (*VersionResponse) Reset ¶
func (x *VersionResponse) Reset()
func (*VersionResponse) String ¶
func (x *VersionResponse) String() string