v1

package
v0.9.4 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: AGPL-3.0 Imports: 19 Imported by: 0

README

Protocol Documentation

Table of Contents

Top

api/v1/api.proto

Group

Group is the object group to filter the global config by.

Field Type Label Description
group_name string optional GroupName is the name of the group.

PluginConfig

PluginConfig is the configuration of the plugin.

Field Type Label Description
id PluginID ID is the identifier that uniquely identifies the plugin.
description string Description is the description of the plugin.
authors string repeated Authors is the list of authors of the plugin.
license string License is the license of the plugin.
project_url string ProjectURL is the project URL of the plugin.
config PluginConfig.ConfigEntry repeated Config is the internal and external configuration of the plugin.
hooks int32 repeated Hooks is the list of hooks the plugin attaches to.
requires PluginConfig.RequiresEntry repeated Requires is the list of plugins the plugin depends on.
tags string repeated Tags is the list of tags of the plugin.
categories string repeated Categories is the list of categories of the plugin.

PluginConfig.ConfigEntry
Field Type Label Description
key string
value string

PluginConfig.RequiresEntry
Field Type Label Description
key string
value string

PluginConfigs

PluginConfigs is the list of plugin configurations.

Field Type Label Description
configs PluginConfig repeated Configs is the list of plugin configurations.

PluginID

PluginID is the identifier that uniquely identifies the plugin.

Field Type Label Description
name string Name is the name of the plugin.
version string Version is the version of the plugin.
remote_url string RemoteURL is the remote URL of the plugin.
checksum string Checksum is the checksum of the plugin.

VersionResponse

VersionResponse is the response returned by the Version RPC.

Field Type Label Description
version string Version is the version of the GatewayD.
version_info string VersionInfo is the detailed version info of the GatewayD.

GatewayDAdminAPIService

GatewayDAdminAPIService is the administration API of GatewayD.

Method Name Request Type Response Type Description
Version .google.protobuf.Empty VersionResponse Version returns the version of the GatewayD.
GetGlobalConfig Group .google.protobuf.Struct GetGlobalConfig returns the global configuration of the GatewayD.
GetPluginConfig .google.protobuf.Empty .google.protobuf.Struct GetPluginConfig returns the configuration of the specified plugin.
GetPlugins .google.protobuf.Empty PluginConfigs GetPlugins returns the list of plugins installed on the GatewayD.
GetPools .google.protobuf.Empty .google.protobuf.Struct GetPools returns the list of pools configured on the GatewayD.
GetProxies .google.protobuf.Empty .google.protobuf.Struct GetProxies returns the list of proxies configured on the GatewayD.
GetServers .google.protobuf.Empty .google.protobuf.Struct GetServers returns the list of servers configured on the GatewayD.

Scalar Value Types

.proto Type Notes C++ Java Python Go C# PHP Ruby
double double double float float64 double float Float
float float float float float32 float float Float
int32 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. int32 int int int32 int integer Bignum or Fixnum (as required)
int64 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. int64 long int/long int64 long integer/string Bignum
uint32 Uses variable-length encoding. uint32 int int/long uint32 uint integer Bignum or Fixnum (as required)
uint64 Uses variable-length encoding. uint64 long int/long uint64 ulong integer/string Bignum or Fixnum (as required)
sint32 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. int32 int int int32 int integer Bignum or Fixnum (as required)
sint64 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. int64 long int/long int64 long integer/string Bignum
fixed32 Always four bytes. More efficient than uint32 if values are often greater than 2^28. uint32 int int uint32 uint integer Bignum or Fixnum (as required)
fixed64 Always eight bytes. More efficient than uint64 if values are often greater than 2^56. uint64 long int/long uint64 ulong integer/string Bignum
sfixed32 Always four bytes. int32 int int int32 int integer Bignum or Fixnum (as required)
sfixed64 Always eight bytes. int64 long int/long int64 long integer/string Bignum
bool bool boolean boolean bool bool boolean TrueClass/FalseClass
string A string must always contain UTF-8 encoded or 7-bit ASCII text. string String str/unicode string string string String (UTF-8)
bytes May contain any arbitrary sequence of bytes. string ByteString str []byte ByteString string String (ASCII-8BIT)

Documentation

Overview

Package v1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
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

View Source
var File_api_v1_api_proto protoreflect.FileDescriptor
View Source
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 *Group, 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.

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, *Group) (*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 Group added in v0.8.6

type Group struct {

	// GroupName is the name of the group.
	GroupName *string `protobuf:"bytes,1,opt,name=group_name,json=groupName,proto3,oneof" json:"group_name,omitempty"`
	// contains filtered or unexported fields
}

Group is the object group to filter the global config by.

func (*Group) Descriptor deprecated added in v0.8.6

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

Deprecated: Use Group.ProtoReflect.Descriptor instead.

func (*Group) GetGroupName added in v0.8.6

func (x *Group) GetGroupName() string

func (*Group) ProtoMessage added in v0.8.6

func (*Group) ProtoMessage()

func (*Group) ProtoReflect added in v0.8.6

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

func (*Group) Reset added in v0.8.6

func (x *Group) Reset()

func (*Group) String added in v0.8.6

func (x *Group) String() string

type PluginConfig

type PluginConfig struct {

	// ID is the identifier that uniquely identifies the plugin.
	Id *PluginID `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Description is the description of the plugin.
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	// Authors is the list of authors of the plugin.
	Authors []string `protobuf:"bytes,3,rep,name=authors,proto3" json:"authors,omitempty"`
	// License is the license of the plugin.
	License string `protobuf:"bytes,4,opt,name=license,proto3" json:"license,omitempty"`
	// ProjectURL is the project URL of the plugin.
	ProjectUrl string `protobuf:"bytes,5,opt,name=project_url,json=projectUrl,proto3" json:"project_url,omitempty"`
	// Config is the internal and external configuration of the plugin.
	Config map[string]string `` /* 153-byte string literal not displayed */
	// Hooks is the list of hooks the plugin attaches to.
	Hooks []int32 `protobuf:"varint,7,rep,packed,name=hooks,proto3" json:"hooks,omitempty"`
	// Requires is the list of plugins the plugin depends on.
	Requires map[string]string `` /* 157-byte string literal not displayed */
	// Tags is the list of tags of the plugin.
	Tags []string `protobuf:"bytes,9,rep,name=tags,proto3" json:"tags,omitempty"`
	// Categories is the list of categories of the plugin.
	Categories []string `protobuf:"bytes,10,rep,name=categories,proto3" json:"categories,omitempty"`
	// contains filtered or unexported fields
}

PluginConfig is the configuration of the plugin.

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 is the list of plugin configurations.
	Configs []*PluginConfig `protobuf:"bytes,1,rep,name=configs,proto3" json:"configs,omitempty"`
	// contains filtered or unexported fields
}

PluginConfigs is the list of plugin configurations.

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 is the name of the plugin.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Version is the version of the plugin.
	Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
	// RemoteURL is the remote URL of the plugin.
	RemoteUrl string `protobuf:"bytes,3,opt,name=remote_url,json=remoteUrl,proto3" json:"remote_url,omitempty"`
	// Checksum is the checksum of the plugin.
	Checksum string `protobuf:"bytes,4,opt,name=checksum,proto3" json:"checksum,omitempty"`
	// contains filtered or unexported fields
}

PluginID is the identifier that uniquely identifies the plugin.

func (*PluginID) Descriptor deprecated

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

Deprecated: Use PluginID.ProtoReflect.Descriptor instead.

func (*PluginID) GetChecksum

func (x *PluginID) GetChecksum() string

func (*PluginID) GetName

func (x *PluginID) GetName() string

func (*PluginID) GetRemoteUrl

func (x *PluginID) GetRemoteUrl() string

func (*PluginID) GetVersion

func (x *PluginID) GetVersion() string

func (*PluginID) ProtoMessage

func (*PluginID) ProtoMessage()

func (*PluginID) ProtoReflect

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

func (*PluginID) Reset

func (x *PluginID) Reset()

func (*PluginID) String

func (x *PluginID) 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) GetPools

func (UnimplementedGatewayDAdminAPIServiceServer) GetProxies

func (UnimplementedGatewayDAdminAPIServiceServer) GetServers

func (UnimplementedGatewayDAdminAPIServiceServer) Version

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 is the version of the GatewayD.
	Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
	// VersionInfo is the detailed version info of the GatewayD.
	VersionInfo string `protobuf:"bytes,2,opt,name=version_info,json=versionInfo,proto3" json:"version_info,omitempty"`
	// contains filtered or unexported fields
}

VersionResponse is the response returned by the Version RPC.

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

Jump to

Keyboard shortcuts

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