Documentation ¶
Overview ¶
Package saucepb is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterControlServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterControlServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ControlServiceClient) error
- func RegisterControlServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterControlServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ControlServiceServer) error
- func RegisterControlServiceServer(s grpc.ServiceRegistrar, srv ControlServiceServer)
- type AcmeAccount
- func (*AcmeAccount) Descriptor() ([]byte, []int)deprecated
- func (x *AcmeAccount) GetEmail() string
- func (x *AcmeAccount) GetPrivateKey() []byte
- func (x *AcmeAccount) GetPublicKey() []byte
- func (*AcmeAccount) ProtoMessage()
- func (x *AcmeAccount) ProtoReflect() protoreflect.Message
- func (x *AcmeAccount) Reset()
- func (x *AcmeAccount) String() string
- type Certificates
- func (*Certificates) Descriptor() ([]byte, []int)deprecated
- func (x *Certificates) GetCertStableUrl() string
- func (x *Certificates) GetCertUrl() string
- func (x *Certificates) GetCertificate() []byte
- func (x *Certificates) GetCsr() []byte
- func (x *Certificates) GetDomain() string
- func (x *Certificates) GetIssuerCertificate() []byte
- func (x *Certificates) GetPrivateKey() []byte
- func (*Certificates) ProtoMessage()
- func (x *Certificates) ProtoReflect() protoreflect.Message
- func (x *Certificates) Reset()
- func (x *Certificates) String() string
- type Command
- type CommandResult
- type ControlServiceClient
- type ControlServiceServer
- type ControlService_StorageConsoleClient
- type ControlService_StorageConsoleServer
- type SelfSigner
- func (*SelfSigner) Descriptor() ([]byte, []int)deprecated
- func (x *SelfSigner) GetCertificate() []byte
- func (x *SelfSigner) GetIssuer() *SelfSigner
- func (x *SelfSigner) GetName() string
- func (x *SelfSigner) GetPrivateKey() []byte
- func (*SelfSigner) ProtoMessage()
- func (x *SelfSigner) ProtoReflect() protoreflect.Message
- func (x *SelfSigner) Reset()
- func (x *SelfSigner) String() string
- type StatusRequest
- type StatusResponse
- type StorageConsoleRequest
- func (*StorageConsoleRequest) Descriptor() ([]byte, []int)deprecated
- func (x *StorageConsoleRequest) GetQuery() string
- func (*StorageConsoleRequest) ProtoMessage()
- func (x *StorageConsoleRequest) ProtoReflect() protoreflect.Message
- func (x *StorageConsoleRequest) Reset()
- func (x *StorageConsoleRequest) String() string
- type StorageConsoleResponse
- func (*StorageConsoleResponse) Descriptor() ([]byte, []int)deprecated
- func (x *StorageConsoleResponse) GetContent() string
- func (x *StorageConsoleResponse) GetStatus() int32
- func (*StorageConsoleResponse) ProtoMessage()
- func (x *StorageConsoleResponse) ProtoReflect() protoreflect.Message
- func (x *StorageConsoleResponse) Reset()
- func (x *StorageConsoleResponse) String() string
- type UnimplementedControlServiceServer
- func (UnimplementedControlServiceServer) Certificate(context.Context, *Command) (*CommandResult, error)
- func (UnimplementedControlServiceServer) Config(context.Context, *Command) (*CommandResult, error)
- func (UnimplementedControlServiceServer) Job(context.Context, *Command) (*CommandResult, error)
- func (UnimplementedControlServiceServer) Node(context.Context, *Command) (*CommandResult, error)
- func (UnimplementedControlServiceServer) Status(context.Context, *StatusRequest) (*StatusResponse, error)
- func (UnimplementedControlServiceServer) Storage(context.Context, *Command) (*CommandResult, error)
- func (UnimplementedControlServiceServer) StorageConsole(ControlService_StorageConsoleServer) error
- type UnsafeControlServiceServer
- type Zone
- func (*Zone) Descriptor() ([]byte, []int)deprecated
- func (x *Zone) GetAcmeEmail() string
- func (x *Zone) GetCertId() string
- func (x *Zone) GetCertProvider() string
- func (x *Zone) GetCertificates() *Certificates
- func (x *Zone) GetDnsProvider() string
- func (x *Zone) GetDnsProviderToken() string
- func (x *Zone) GetDomains() []string
- func (x *Zone) GetOptions() []string
- func (x *Zone) GetOwnerId() string
- func (x *Zone) GetSelfSigner() string
- func (x *Zone) GetZone() string
- func (*Zone) ProtoMessage()
- func (x *Zone) ProtoReflect() protoreflect.Message
- func (x *Zone) Reset()
- func (x *Zone) String() string
Constants ¶
This section is empty.
Variables ¶
var ControlService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "node.ControlService", HandlerType: (*ControlServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Status", Handler: _ControlService_Status_Handler, }, { MethodName: "Node", Handler: _ControlService_Node_Handler, }, { MethodName: "Config", Handler: _ControlService_Config_Handler, }, { MethodName: "Certificate", Handler: _ControlService_Certificate_Handler, }, { MethodName: "Storage", Handler: _ControlService_Storage_Handler, }, { MethodName: "Job", Handler: _ControlService_Job_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "StorageConsole", Handler: _ControlService_StorageConsole_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "control.proto", }
ControlService_ServiceDesc is the grpc.ServiceDesc for ControlService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_certificates_proto protoreflect.FileDescriptor
var File_control_proto protoreflect.FileDescriptor
Functions ¶
func RegisterControlServiceHandler ¶
func RegisterControlServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterControlServiceHandler registers the http handlers for service ControlService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterControlServiceHandlerClient ¶
func RegisterControlServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ControlServiceClient) error
RegisterControlServiceHandlerClient registers the http handlers for service ControlService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ControlServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ControlServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ControlServiceClient" to call the correct interceptors.
func RegisterControlServiceHandlerFromEndpoint ¶
func RegisterControlServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterControlServiceHandlerFromEndpoint is same as RegisterControlServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterControlServiceHandlerServer ¶
func RegisterControlServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ControlServiceServer) error
RegisterControlServiceHandlerServer registers the http handlers for service ControlService to "mux". UnaryRPC :call ControlServiceServer 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 RegisterControlServiceHandlerFromEndpoint instead.
func RegisterControlServiceServer ¶
func RegisterControlServiceServer(s grpc.ServiceRegistrar, srv ControlServiceServer)
Types ¶
type AcmeAccount ¶
type AcmeAccount struct { Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` PublicKey []byte `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` PrivateKey []byte `protobuf:"bytes,3,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` // contains filtered or unexported fields }
func (*AcmeAccount) Descriptor
deprecated
func (*AcmeAccount) Descriptor() ([]byte, []int)
Deprecated: Use AcmeAccount.ProtoReflect.Descriptor instead.
func (*AcmeAccount) GetEmail ¶
func (x *AcmeAccount) GetEmail() string
func (*AcmeAccount) GetPrivateKey ¶
func (x *AcmeAccount) GetPrivateKey() []byte
func (*AcmeAccount) GetPublicKey ¶
func (x *AcmeAccount) GetPublicKey() []byte
func (*AcmeAccount) ProtoMessage ¶
func (*AcmeAccount) ProtoMessage()
func (*AcmeAccount) ProtoReflect ¶
func (x *AcmeAccount) ProtoReflect() protoreflect.Message
func (*AcmeAccount) Reset ¶
func (x *AcmeAccount) Reset()
func (*AcmeAccount) String ¶
func (x *AcmeAccount) String() string
type Certificates ¶
type Certificates struct { Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"` CertUrl string `protobuf:"bytes,2,opt,name=cert_url,json=certUrl,proto3" json:"cert_url,omitempty"` // needs for ACME CertStableUrl string `protobuf:"bytes,3,opt,name=cert_stable_url,json=certStableUrl,proto3" json:"cert_stable_url,omitempty"` // needs for ACME PrivateKey []byte `protobuf:"bytes,4,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` // in PEM format Certificate []byte `protobuf:"bytes,5,opt,name=certificate,proto3" json:"certificate,omitempty"` // in PEM format IssuerCertificate []byte `protobuf:"bytes,6,opt,name=issuer_certificate,json=issuerCertificate,proto3" json:"issuer_certificate,omitempty"` // in PEM format Csr []byte `protobuf:"bytes,7,opt,name=csr,proto3" json:"csr,omitempty"` // contains filtered or unexported fields }
func (*Certificates) Descriptor
deprecated
func (*Certificates) Descriptor() ([]byte, []int)
Deprecated: Use Certificates.ProtoReflect.Descriptor instead.
func (*Certificates) GetCertStableUrl ¶
func (x *Certificates) GetCertStableUrl() string
func (*Certificates) GetCertUrl ¶
func (x *Certificates) GetCertUrl() string
func (*Certificates) GetCertificate ¶
func (x *Certificates) GetCertificate() []byte
func (*Certificates) GetCsr ¶
func (x *Certificates) GetCsr() []byte
func (*Certificates) GetDomain ¶
func (x *Certificates) GetDomain() string
func (*Certificates) GetIssuerCertificate ¶
func (x *Certificates) GetIssuerCertificate() []byte
func (*Certificates) GetPrivateKey ¶
func (x *Certificates) GetPrivateKey() []byte
func (*Certificates) ProtoMessage ¶
func (*Certificates) ProtoMessage()
func (*Certificates) ProtoReflect ¶
func (x *Certificates) ProtoReflect() protoreflect.Message
func (*Certificates) Reset ¶
func (x *Certificates) Reset()
func (*Certificates) String ¶
func (x *Certificates) String() string
type Command ¶
type Command struct { Command string `protobuf:"bytes,1,opt,name=command,proto3" json:"command,omitempty"` Args []string `protobuf:"bytes,2,rep,name=args,proto3" json:"args,omitempty"` // contains filtered or unexported fields }
func (*Command) Descriptor
deprecated
func (*Command) GetCommand ¶
func (*Command) ProtoMessage ¶
func (*Command) ProtoMessage()
func (*Command) ProtoReflect ¶
func (x *Command) ProtoReflect() protoreflect.Message
type CommandResult ¶
type CommandResult struct { Content string `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` // contains filtered or unexported fields }
func (*CommandResult) Descriptor
deprecated
func (*CommandResult) Descriptor() ([]byte, []int)
Deprecated: Use CommandResult.ProtoReflect.Descriptor instead.
func (*CommandResult) GetContent ¶
func (x *CommandResult) GetContent() string
func (*CommandResult) ProtoMessage ¶
func (*CommandResult) ProtoMessage()
func (*CommandResult) ProtoReflect ¶
func (x *CommandResult) ProtoReflect() protoreflect.Message
func (*CommandResult) Reset ¶
func (x *CommandResult) Reset()
func (*CommandResult) String ¶
func (x *CommandResult) String() string
type ControlServiceClient ¶
type ControlServiceClient interface { // // Gets status info // Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error) // // Node management commands // Node(ctx context.Context, in *Command, opts ...grpc.CallOption) (*CommandResult, error) // // Config management commands // Config(ctx context.Context, in *Command, opts ...grpc.CallOption) (*CommandResult, error) // // Certificate management commands // Certificate(ctx context.Context, in *Command, opts ...grpc.CallOption) (*CommandResult, error) // // Storage console // StorageConsole(ctx context.Context, opts ...grpc.CallOption) (ControlService_StorageConsoleClient, error) // // Storage management commands // Storage(ctx context.Context, in *Command, opts ...grpc.CallOption) (*CommandResult, error) // // Job commands // Job(ctx context.Context, in *Command, opts ...grpc.CallOption) (*CommandResult, error) }
ControlServiceClient is the client API for ControlService 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 NewControlServiceClient ¶
func NewControlServiceClient(cc grpc.ClientConnInterface) ControlServiceClient
type ControlServiceServer ¶
type ControlServiceServer interface { // // Gets status info // Status(context.Context, *StatusRequest) (*StatusResponse, error) // // Node management commands // Node(context.Context, *Command) (*CommandResult, error) // // Config management commands // Config(context.Context, *Command) (*CommandResult, error) // // Certificate management commands // Certificate(context.Context, *Command) (*CommandResult, error) // // Storage console // StorageConsole(ControlService_StorageConsoleServer) error // // Storage management commands // Storage(context.Context, *Command) (*CommandResult, error) // // Job commands // Job(context.Context, *Command) (*CommandResult, error) // contains filtered or unexported methods }
ControlServiceServer is the server API for ControlService service. All implementations must embed UnimplementedControlServiceServer for forward compatibility
type ControlService_StorageConsoleClient ¶
type ControlService_StorageConsoleClient interface { Send(*StorageConsoleRequest) error Recv() (*StorageConsoleResponse, error) grpc.ClientStream }
type ControlService_StorageConsoleServer ¶
type ControlService_StorageConsoleServer interface { Send(*StorageConsoleResponse) error Recv() (*StorageConsoleRequest, error) grpc.ServerStream }
type SelfSigner ¶
type SelfSigner struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Certificate []byte `protobuf:"bytes,2,opt,name=certificate,proto3" json:"certificate,omitempty"` PrivateKey []byte `protobuf:"bytes,3,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` Issuer *SelfSigner `protobuf:"bytes,4,opt,name=issuer,proto3" json:"issuer,omitempty"` // contains filtered or unexported fields }
func (*SelfSigner) Descriptor
deprecated
func (*SelfSigner) Descriptor() ([]byte, []int)
Deprecated: Use SelfSigner.ProtoReflect.Descriptor instead.
func (*SelfSigner) GetCertificate ¶
func (x *SelfSigner) GetCertificate() []byte
func (*SelfSigner) GetIssuer ¶
func (x *SelfSigner) GetIssuer() *SelfSigner
func (*SelfSigner) GetName ¶
func (x *SelfSigner) GetName() string
func (*SelfSigner) GetPrivateKey ¶
func (x *SelfSigner) GetPrivateKey() []byte
func (*SelfSigner) ProtoMessage ¶
func (*SelfSigner) ProtoMessage()
func (*SelfSigner) ProtoReflect ¶
func (x *SelfSigner) ProtoReflect() protoreflect.Message
func (*SelfSigner) Reset ¶
func (x *SelfSigner) Reset()
func (*SelfSigner) String ¶
func (x *SelfSigner) String() string
type StatusRequest ¶
type StatusRequest struct {
// contains filtered or unexported fields
}
func (*StatusRequest) Descriptor
deprecated
func (*StatusRequest) Descriptor() ([]byte, []int)
Deprecated: Use StatusRequest.ProtoReflect.Descriptor instead.
func (*StatusRequest) ProtoMessage ¶
func (*StatusRequest) ProtoMessage()
func (*StatusRequest) ProtoReflect ¶
func (x *StatusRequest) ProtoReflect() protoreflect.Message
func (*StatusRequest) Reset ¶
func (x *StatusRequest) Reset()
func (*StatusRequest) String ¶
func (x *StatusRequest) String() string
type StatusResponse ¶
type StatusResponse struct { Stats map[string]string `` /* 151-byte string literal not displayed */ // contains filtered or unexported fields }
func (*StatusResponse) Descriptor
deprecated
func (*StatusResponse) Descriptor() ([]byte, []int)
Deprecated: Use StatusResponse.ProtoReflect.Descriptor instead.
func (*StatusResponse) GetStats ¶
func (x *StatusResponse) GetStats() map[string]string
func (*StatusResponse) ProtoMessage ¶
func (*StatusResponse) ProtoMessage()
func (*StatusResponse) ProtoReflect ¶
func (x *StatusResponse) ProtoReflect() protoreflect.Message
func (*StatusResponse) Reset ¶
func (x *StatusResponse) Reset()
func (*StatusResponse) String ¶
func (x *StatusResponse) String() string
type StorageConsoleRequest ¶
type StorageConsoleRequest struct { Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` // contains filtered or unexported fields }
func (*StorageConsoleRequest) Descriptor
deprecated
func (*StorageConsoleRequest) Descriptor() ([]byte, []int)
Deprecated: Use StorageConsoleRequest.ProtoReflect.Descriptor instead.
func (*StorageConsoleRequest) GetQuery ¶
func (x *StorageConsoleRequest) GetQuery() string
func (*StorageConsoleRequest) ProtoMessage ¶
func (*StorageConsoleRequest) ProtoMessage()
func (*StorageConsoleRequest) ProtoReflect ¶
func (x *StorageConsoleRequest) ProtoReflect() protoreflect.Message
func (*StorageConsoleRequest) Reset ¶
func (x *StorageConsoleRequest) Reset()
func (*StorageConsoleRequest) String ¶
func (x *StorageConsoleRequest) String() string
type StorageConsoleResponse ¶
type StorageConsoleResponse struct { Status int32 `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"` // HTTP codes Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"` // contains filtered or unexported fields }
func (*StorageConsoleResponse) Descriptor
deprecated
func (*StorageConsoleResponse) Descriptor() ([]byte, []int)
Deprecated: Use StorageConsoleResponse.ProtoReflect.Descriptor instead.
func (*StorageConsoleResponse) GetContent ¶
func (x *StorageConsoleResponse) GetContent() string
func (*StorageConsoleResponse) GetStatus ¶
func (x *StorageConsoleResponse) GetStatus() int32
func (*StorageConsoleResponse) ProtoMessage ¶
func (*StorageConsoleResponse) ProtoMessage()
func (*StorageConsoleResponse) ProtoReflect ¶
func (x *StorageConsoleResponse) ProtoReflect() protoreflect.Message
func (*StorageConsoleResponse) Reset ¶
func (x *StorageConsoleResponse) Reset()
func (*StorageConsoleResponse) String ¶
func (x *StorageConsoleResponse) String() string
type UnimplementedControlServiceServer ¶
type UnimplementedControlServiceServer struct { }
UnimplementedControlServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedControlServiceServer) Certificate ¶
func (UnimplementedControlServiceServer) Certificate(context.Context, *Command) (*CommandResult, error)
func (UnimplementedControlServiceServer) Config ¶
func (UnimplementedControlServiceServer) Config(context.Context, *Command) (*CommandResult, error)
func (UnimplementedControlServiceServer) Job ¶
func (UnimplementedControlServiceServer) Job(context.Context, *Command) (*CommandResult, error)
func (UnimplementedControlServiceServer) Node ¶
func (UnimplementedControlServiceServer) Node(context.Context, *Command) (*CommandResult, error)
func (UnimplementedControlServiceServer) Status ¶
func (UnimplementedControlServiceServer) Status(context.Context, *StatusRequest) (*StatusResponse, error)
func (UnimplementedControlServiceServer) Storage ¶
func (UnimplementedControlServiceServer) Storage(context.Context, *Command) (*CommandResult, error)
func (UnimplementedControlServiceServer) StorageConsole ¶
func (UnimplementedControlServiceServer) StorageConsole(ControlService_StorageConsoleServer) error
type UnsafeControlServiceServer ¶
type UnsafeControlServiceServer interface {
// contains filtered or unexported methods
}
UnsafeControlServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ControlServiceServer will result in compilation errors.
type Zone ¶
type Zone struct { Zone string `protobuf:"bytes,1,opt,name=zone,proto3" json:"zone,omitempty"` // example.com, zone is in punycode Domains []string `protobuf:"bytes,2,rep,name=domains,proto3" json:"domains,omitempty"` // domain names in the zone, utf-8 Options []string `protobuf:"bytes,3,rep,name=options,proto3" json:"options,omitempty"` // if has "zone" then certificate will include zone name, if "localhost" then localhost, if "ip" then will include host IPs. DnsProvider string `protobuf:"bytes,4,opt,name=dns_provider,json=dnsProvider,proto3" json:"dns_provider,omitempty"` // code name of the DNS provider, if empty then cert_provider should be self or external CertProvider string `protobuf:"bytes,5,opt,name=cert_provider,json=certProvider,proto3" json:"cert_provider,omitempty"` // self, acme, ext Certificates *Certificates `protobuf:"bytes,10,opt,name=certificates,proto3" json:"certificates,omitempty"` // certificates used to create TLS connection SelfSigner string `protobuf:"bytes,11,opt,name=self_signer,json=selfSigner,proto3" json:"self_signer,omitempty"` // only for self cert_provider AcmeEmail string `protobuf:"bytes,12,opt,name=acme_email,json=acmeEmail,proto3" json:"acme_email,omitempty"` // only for acme cert_provider DnsProviderToken string `protobuf:"bytes,13,opt,name=dns_provider_token,json=dnsProviderToken,proto3" json:"dns_provider_token,omitempty"` // optional token for DNS provider OwnerId string `protobuf:"bytes,14,opt,name=owner_id,json=ownerId,proto3" json:"owner_id,omitempty"` // associated owner id CertId string `protobuf:"bytes,15,opt,name=cert_id,json=certId,proto3" json:"cert_id,omitempty"` // associated cert id // contains filtered or unexported fields }
func (*Zone) Descriptor
deprecated
func (*Zone) GetAcmeEmail ¶
func (*Zone) GetCertProvider ¶
func (*Zone) GetCertificates ¶
func (x *Zone) GetCertificates() *Certificates
func (*Zone) GetDnsProvider ¶
func (*Zone) GetDnsProviderToken ¶
func (*Zone) GetDomains ¶
func (*Zone) GetOptions ¶
func (*Zone) GetOwnerId ¶
func (*Zone) GetSelfSigner ¶
func (*Zone) ProtoMessage ¶
func (*Zone) ProtoMessage()
func (*Zone) ProtoReflect ¶
func (x *Zone) ProtoReflect() protoreflect.Message