mirror of
https://github.com/openziti/zrok.git
synced 2024-12-23 07:09:12 +01:00
private access wiring (#463)
This commit is contained in:
parent
9881401844
commit
9d829c173a
@ -1,20 +1,71 @@
|
||||
package agent
|
||||
|
||||
import (
|
||||
"github.com/openziti/zrok/agent/agentGrpc"
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"github.com/michaelquigley/pfxlog"
|
||||
"github.com/openziti/zrok/agent/proctree"
|
||||
"github.com/sirupsen/logrus"
|
||||
"strings"
|
||||
)
|
||||
|
||||
type access struct {
|
||||
frontendToken string
|
||||
token string
|
||||
|
||||
bindAddress string
|
||||
responseHeaders []string
|
||||
|
||||
process *proctree.Child
|
||||
}
|
||||
readBuffer bytes.Buffer
|
||||
booted bool
|
||||
bootComplete chan struct{}
|
||||
bootErr error
|
||||
|
||||
type agentGrpcImpl struct {
|
||||
agentGrpc.UnimplementedAgentServer
|
||||
a *Agent
|
||||
}
|
||||
|
||||
func (a *access) monitor() {
|
||||
if err := proctree.WaitChild(a.process); err != nil {
|
||||
pfxlog.ChannelLogger(a.token).Error(err)
|
||||
}
|
||||
a.a.outAccesses <- a
|
||||
}
|
||||
|
||||
func (a *access) tail(data []byte) {
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
logrus.Errorf("recovering: %v", r)
|
||||
}
|
||||
}()
|
||||
a.readBuffer.Write(data)
|
||||
if line, err := a.readBuffer.ReadString('\n'); err == nil {
|
||||
line = strings.Trim(line, "\n")
|
||||
if !a.booted {
|
||||
in := make(map[string]interface{})
|
||||
if err := json.Unmarshal([]byte(line), &in); err == nil {
|
||||
if v, found := in["frontend-token"]; found {
|
||||
if str, ok := v.(string); ok {
|
||||
a.frontendToken = str
|
||||
}
|
||||
}
|
||||
a.booted = true
|
||||
} else {
|
||||
a.bootErr = errors.New(line)
|
||||
}
|
||||
close(a.bootComplete)
|
||||
|
||||
} else {
|
||||
if strings.HasPrefix(line, "{") {
|
||||
in := make(map[string]interface{})
|
||||
if err := json.Unmarshal([]byte(line), &in); err == nil {
|
||||
pfxlog.ChannelLogger(a.token).Info(in)
|
||||
}
|
||||
} else {
|
||||
pfxlog.ChannelLogger(a.token).Info(strings.Trim(line, "\n"))
|
||||
}
|
||||
}
|
||||
} else {
|
||||
a.readBuffer.WriteString(line)
|
||||
}
|
||||
}
|
||||
|
@ -106,3 +106,8 @@ func (a *Agent) manager() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
type agentGrpcImpl struct {
|
||||
agentGrpc.UnimplementedAgentServer
|
||||
a *Agent
|
||||
}
|
||||
|
@ -83,17 +83,16 @@ func (x *AccessDetail) GetResponseHeaders() []string {
|
||||
return nil
|
||||
}
|
||||
|
||||
type PublicShareReply struct {
|
||||
type PrivateAccessReply struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
|
||||
FrontendEndpoints []string `protobuf:"bytes,2,rep,name=frontendEndpoints,proto3" json:"frontendEndpoints,omitempty"`
|
||||
FrontendToken string `protobuf:"bytes,1,opt,name=frontendToken,proto3" json:"frontendToken,omitempty"`
|
||||
}
|
||||
|
||||
func (x *PublicShareReply) Reset() {
|
||||
*x = PublicShareReply{}
|
||||
func (x *PrivateAccessReply) Reset() {
|
||||
*x = PrivateAccessReply{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_agent_agentGrpc_agent_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
@ -101,13 +100,13 @@ func (x *PublicShareReply) Reset() {
|
||||
}
|
||||
}
|
||||
|
||||
func (x *PublicShareReply) String() string {
|
||||
func (x *PrivateAccessReply) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*PublicShareReply) ProtoMessage() {}
|
||||
func (*PrivateAccessReply) ProtoMessage() {}
|
||||
|
||||
func (x *PublicShareReply) ProtoReflect() protoreflect.Message {
|
||||
func (x *PrivateAccessReply) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_agent_agentGrpc_agent_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
@ -119,140 +118,77 @@ func (x *PublicShareReply) ProtoReflect() protoreflect.Message {
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use PublicShareReply.ProtoReflect.Descriptor instead.
|
||||
func (*PublicShareReply) Descriptor() ([]byte, []int) {
|
||||
// Deprecated: Use PrivateAccessReply.ProtoReflect.Descriptor instead.
|
||||
func (*PrivateAccessReply) Descriptor() ([]byte, []int) {
|
||||
return file_agent_agentGrpc_agent_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *PublicShareReply) GetToken() string {
|
||||
func (x *PrivateAccessReply) GetFrontendToken() string {
|
||||
if x != nil {
|
||||
return x.FrontendToken
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type PrivateAccessRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
|
||||
BindAddress string `protobuf:"bytes,2,opt,name=bindAddress,proto3" json:"bindAddress,omitempty"`
|
||||
ResponseHeaders []string `protobuf:"bytes,3,rep,name=responseHeaders,proto3" json:"responseHeaders,omitempty"`
|
||||
}
|
||||
|
||||
func (x *PrivateAccessRequest) Reset() {
|
||||
*x = PrivateAccessRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_agent_agentGrpc_agent_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *PrivateAccessRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*PrivateAccessRequest) ProtoMessage() {}
|
||||
|
||||
func (x *PrivateAccessRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_agent_agentGrpc_agent_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use PrivateAccessRequest.ProtoReflect.Descriptor instead.
|
||||
func (*PrivateAccessRequest) Descriptor() ([]byte, []int) {
|
||||
return file_agent_agentGrpc_agent_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *PrivateAccessRequest) GetToken() string {
|
||||
if x != nil {
|
||||
return x.Token
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *PublicShareReply) GetFrontendEndpoints() []string {
|
||||
func (x *PrivateAccessRequest) GetBindAddress() string {
|
||||
if x != nil {
|
||||
return x.FrontendEndpoints
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type PublicShareRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Target string `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"`
|
||||
BasicAuth []string `protobuf:"bytes,2,rep,name=basicAuth,proto3" json:"basicAuth,omitempty"`
|
||||
FrontendSelection []string `protobuf:"bytes,3,rep,name=frontendSelection,proto3" json:"frontendSelection,omitempty"`
|
||||
BackendMode string `protobuf:"bytes,4,opt,name=backendMode,proto3" json:"backendMode,omitempty"`
|
||||
Insecure bool `protobuf:"varint,5,opt,name=insecure,proto3" json:"insecure,omitempty"`
|
||||
OauthProvider string `protobuf:"bytes,6,opt,name=oauthProvider,proto3" json:"oauthProvider,omitempty"`
|
||||
OauthEmailAddressPatterns []string `protobuf:"bytes,7,rep,name=oauthEmailAddressPatterns,proto3" json:"oauthEmailAddressPatterns,omitempty"`
|
||||
OauthCheckInterval string `protobuf:"bytes,8,opt,name=oauthCheckInterval,proto3" json:"oauthCheckInterval,omitempty"`
|
||||
Closed bool `protobuf:"varint,9,opt,name=closed,proto3" json:"closed,omitempty"`
|
||||
AccessGrants []string `protobuf:"bytes,10,rep,name=accessGrants,proto3" json:"accessGrants,omitempty"`
|
||||
}
|
||||
|
||||
func (x *PublicShareRequest) Reset() {
|
||||
*x = PublicShareRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_agent_agentGrpc_agent_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *PublicShareRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*PublicShareRequest) ProtoMessage() {}
|
||||
|
||||
func (x *PublicShareRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_agent_agentGrpc_agent_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use PublicShareRequest.ProtoReflect.Descriptor instead.
|
||||
func (*PublicShareRequest) Descriptor() ([]byte, []int) {
|
||||
return file_agent_agentGrpc_agent_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *PublicShareRequest) GetTarget() string {
|
||||
if x != nil {
|
||||
return x.Target
|
||||
return x.BindAddress
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *PublicShareRequest) GetBasicAuth() []string {
|
||||
func (x *PrivateAccessRequest) GetResponseHeaders() []string {
|
||||
if x != nil {
|
||||
return x.BasicAuth
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *PublicShareRequest) GetFrontendSelection() []string {
|
||||
if x != nil {
|
||||
return x.FrontendSelection
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *PublicShareRequest) GetBackendMode() string {
|
||||
if x != nil {
|
||||
return x.BackendMode
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *PublicShareRequest) GetInsecure() bool {
|
||||
if x != nil {
|
||||
return x.Insecure
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *PublicShareRequest) GetOauthProvider() string {
|
||||
if x != nil {
|
||||
return x.OauthProvider
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *PublicShareRequest) GetOauthEmailAddressPatterns() []string {
|
||||
if x != nil {
|
||||
return x.OauthEmailAddressPatterns
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *PublicShareRequest) GetOauthCheckInterval() string {
|
||||
if x != nil {
|
||||
return x.OauthCheckInterval
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *PublicShareRequest) GetClosed() bool {
|
||||
if x != nil {
|
||||
return x.Closed
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *PublicShareRequest) GetAccessGrants() []string {
|
||||
if x != nil {
|
||||
return x.AccessGrants
|
||||
return x.ResponseHeaders
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@ -383,6 +319,180 @@ func (x *PrivateShareRequest) GetAccessGrants() []string {
|
||||
return nil
|
||||
}
|
||||
|
||||
type PublicShareReply struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
|
||||
FrontendEndpoints []string `protobuf:"bytes,2,rep,name=frontendEndpoints,proto3" json:"frontendEndpoints,omitempty"`
|
||||
}
|
||||
|
||||
func (x *PublicShareReply) Reset() {
|
||||
*x = PublicShareReply{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_agent_agentGrpc_agent_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *PublicShareReply) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*PublicShareReply) ProtoMessage() {}
|
||||
|
||||
func (x *PublicShareReply) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_agent_agentGrpc_agent_proto_msgTypes[5]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use PublicShareReply.ProtoReflect.Descriptor instead.
|
||||
func (*PublicShareReply) Descriptor() ([]byte, []int) {
|
||||
return file_agent_agentGrpc_agent_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *PublicShareReply) GetToken() string {
|
||||
if x != nil {
|
||||
return x.Token
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *PublicShareReply) GetFrontendEndpoints() []string {
|
||||
if x != nil {
|
||||
return x.FrontendEndpoints
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type PublicShareRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Target string `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"`
|
||||
BasicAuth []string `protobuf:"bytes,2,rep,name=basicAuth,proto3" json:"basicAuth,omitempty"`
|
||||
FrontendSelection []string `protobuf:"bytes,3,rep,name=frontendSelection,proto3" json:"frontendSelection,omitempty"`
|
||||
BackendMode string `protobuf:"bytes,4,opt,name=backendMode,proto3" json:"backendMode,omitempty"`
|
||||
Insecure bool `protobuf:"varint,5,opt,name=insecure,proto3" json:"insecure,omitempty"`
|
||||
OauthProvider string `protobuf:"bytes,6,opt,name=oauthProvider,proto3" json:"oauthProvider,omitempty"`
|
||||
OauthEmailAddressPatterns []string `protobuf:"bytes,7,rep,name=oauthEmailAddressPatterns,proto3" json:"oauthEmailAddressPatterns,omitempty"`
|
||||
OauthCheckInterval string `protobuf:"bytes,8,opt,name=oauthCheckInterval,proto3" json:"oauthCheckInterval,omitempty"`
|
||||
Closed bool `protobuf:"varint,9,opt,name=closed,proto3" json:"closed,omitempty"`
|
||||
AccessGrants []string `protobuf:"bytes,10,rep,name=accessGrants,proto3" json:"accessGrants,omitempty"`
|
||||
}
|
||||
|
||||
func (x *PublicShareRequest) Reset() {
|
||||
*x = PublicShareRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_agent_agentGrpc_agent_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *PublicShareRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*PublicShareRequest) ProtoMessage() {}
|
||||
|
||||
func (x *PublicShareRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_agent_agentGrpc_agent_proto_msgTypes[6]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use PublicShareRequest.ProtoReflect.Descriptor instead.
|
||||
func (*PublicShareRequest) Descriptor() ([]byte, []int) {
|
||||
return file_agent_agentGrpc_agent_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
func (x *PublicShareRequest) GetTarget() string {
|
||||
if x != nil {
|
||||
return x.Target
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *PublicShareRequest) GetBasicAuth() []string {
|
||||
if x != nil {
|
||||
return x.BasicAuth
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *PublicShareRequest) GetFrontendSelection() []string {
|
||||
if x != nil {
|
||||
return x.FrontendSelection
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *PublicShareRequest) GetBackendMode() string {
|
||||
if x != nil {
|
||||
return x.BackendMode
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *PublicShareRequest) GetInsecure() bool {
|
||||
if x != nil {
|
||||
return x.Insecure
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *PublicShareRequest) GetOauthProvider() string {
|
||||
if x != nil {
|
||||
return x.OauthProvider
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *PublicShareRequest) GetOauthEmailAddressPatterns() []string {
|
||||
if x != nil {
|
||||
return x.OauthEmailAddressPatterns
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *PublicShareRequest) GetOauthCheckInterval() string {
|
||||
if x != nil {
|
||||
return x.OauthCheckInterval
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *PublicShareRequest) GetClosed() bool {
|
||||
if x != nil {
|
||||
return x.Closed
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *PublicShareRequest) GetAccessGrants() []string {
|
||||
if x != nil {
|
||||
return x.AccessGrants
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type ReleaseShareRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
@ -394,7 +504,7 @@ type ReleaseShareRequest struct {
|
||||
func (x *ReleaseShareRequest) Reset() {
|
||||
*x = ReleaseShareRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_agent_agentGrpc_agent_proto_msgTypes[5]
|
||||
mi := &file_agent_agentGrpc_agent_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -407,7 +517,7 @@ func (x *ReleaseShareRequest) String() string {
|
||||
func (*ReleaseShareRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ReleaseShareRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_agent_agentGrpc_agent_proto_msgTypes[5]
|
||||
mi := &file_agent_agentGrpc_agent_proto_msgTypes[7]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -420,7 +530,7 @@ func (x *ReleaseShareRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use ReleaseShareRequest.ProtoReflect.Descriptor instead.
|
||||
func (*ReleaseShareRequest) Descriptor() ([]byte, []int) {
|
||||
return file_agent_agentGrpc_agent_proto_rawDescGZIP(), []int{5}
|
||||
return file_agent_agentGrpc_agent_proto_rawDescGZIP(), []int{7}
|
||||
}
|
||||
|
||||
func (x *ReleaseShareRequest) GetToken() string {
|
||||
@ -439,7 +549,7 @@ type ReleaseShareReply struct {
|
||||
func (x *ReleaseShareReply) Reset() {
|
||||
*x = ReleaseShareReply{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_agent_agentGrpc_agent_proto_msgTypes[6]
|
||||
mi := &file_agent_agentGrpc_agent_proto_msgTypes[8]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -452,7 +562,7 @@ func (x *ReleaseShareReply) String() string {
|
||||
func (*ReleaseShareReply) ProtoMessage() {}
|
||||
|
||||
func (x *ReleaseShareReply) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_agent_agentGrpc_agent_proto_msgTypes[6]
|
||||
mi := &file_agent_agentGrpc_agent_proto_msgTypes[8]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -465,7 +575,7 @@ func (x *ReleaseShareReply) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use ReleaseShareReply.ProtoReflect.Descriptor instead.
|
||||
func (*ReleaseShareReply) Descriptor() ([]byte, []int) {
|
||||
return file_agent_agentGrpc_agent_proto_rawDescGZIP(), []int{6}
|
||||
return file_agent_agentGrpc_agent_proto_rawDescGZIP(), []int{8}
|
||||
}
|
||||
|
||||
type ShareDetail struct {
|
||||
@ -486,7 +596,7 @@ type ShareDetail struct {
|
||||
func (x *ShareDetail) Reset() {
|
||||
*x = ShareDetail{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_agent_agentGrpc_agent_proto_msgTypes[7]
|
||||
mi := &file_agent_agentGrpc_agent_proto_msgTypes[9]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -499,7 +609,7 @@ func (x *ShareDetail) String() string {
|
||||
func (*ShareDetail) ProtoMessage() {}
|
||||
|
||||
func (x *ShareDetail) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_agent_agentGrpc_agent_proto_msgTypes[7]
|
||||
mi := &file_agent_agentGrpc_agent_proto_msgTypes[9]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -512,7 +622,7 @@ func (x *ShareDetail) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use ShareDetail.ProtoReflect.Descriptor instead.
|
||||
func (*ShareDetail) Descriptor() ([]byte, []int) {
|
||||
return file_agent_agentGrpc_agent_proto_rawDescGZIP(), []int{7}
|
||||
return file_agent_agentGrpc_agent_proto_rawDescGZIP(), []int{9}
|
||||
}
|
||||
|
||||
func (x *ShareDetail) GetToken() string {
|
||||
@ -580,7 +690,7 @@ type StatusRequest struct {
|
||||
func (x *StatusRequest) Reset() {
|
||||
*x = StatusRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_agent_agentGrpc_agent_proto_msgTypes[8]
|
||||
mi := &file_agent_agentGrpc_agent_proto_msgTypes[10]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -593,7 +703,7 @@ func (x *StatusRequest) String() string {
|
||||
func (*StatusRequest) ProtoMessage() {}
|
||||
|
||||
func (x *StatusRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_agent_agentGrpc_agent_proto_msgTypes[8]
|
||||
mi := &file_agent_agentGrpc_agent_proto_msgTypes[10]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -606,7 +716,7 @@ func (x *StatusRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use StatusRequest.ProtoReflect.Descriptor instead.
|
||||
func (*StatusRequest) Descriptor() ([]byte, []int) {
|
||||
return file_agent_agentGrpc_agent_proto_rawDescGZIP(), []int{8}
|
||||
return file_agent_agentGrpc_agent_proto_rawDescGZIP(), []int{10}
|
||||
}
|
||||
|
||||
type StatusReply struct {
|
||||
@ -621,7 +731,7 @@ type StatusReply struct {
|
||||
func (x *StatusReply) Reset() {
|
||||
*x = StatusReply{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_agent_agentGrpc_agent_proto_msgTypes[9]
|
||||
mi := &file_agent_agentGrpc_agent_proto_msgTypes[11]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -634,7 +744,7 @@ func (x *StatusReply) String() string {
|
||||
func (*StatusReply) ProtoMessage() {}
|
||||
|
||||
func (x *StatusReply) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_agent_agentGrpc_agent_proto_msgTypes[9]
|
||||
mi := &file_agent_agentGrpc_agent_proto_msgTypes[11]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -647,7 +757,7 @@ func (x *StatusReply) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use StatusReply.ProtoReflect.Descriptor instead.
|
||||
func (*StatusReply) Descriptor() ([]byte, []int) {
|
||||
return file_agent_agentGrpc_agent_proto_rawDescGZIP(), []int{9}
|
||||
return file_agent_agentGrpc_agent_proto_rawDescGZIP(), []int{11}
|
||||
}
|
||||
|
||||
func (x *StatusReply) GetAccesses() []*AccessDetail {
|
||||
@ -673,7 +783,7 @@ type VersionRequest struct {
|
||||
func (x *VersionRequest) Reset() {
|
||||
*x = VersionRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_agent_agentGrpc_agent_proto_msgTypes[10]
|
||||
mi := &file_agent_agentGrpc_agent_proto_msgTypes[12]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -686,7 +796,7 @@ func (x *VersionRequest) String() string {
|
||||
func (*VersionRequest) ProtoMessage() {}
|
||||
|
||||
func (x *VersionRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_agent_agentGrpc_agent_proto_msgTypes[10]
|
||||
mi := &file_agent_agentGrpc_agent_proto_msgTypes[12]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -699,7 +809,7 @@ func (x *VersionRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use VersionRequest.ProtoReflect.Descriptor instead.
|
||||
func (*VersionRequest) Descriptor() ([]byte, []int) {
|
||||
return file_agent_agentGrpc_agent_proto_rawDescGZIP(), []int{10}
|
||||
return file_agent_agentGrpc_agent_proto_rawDescGZIP(), []int{12}
|
||||
}
|
||||
|
||||
type VersionReply struct {
|
||||
@ -713,7 +823,7 @@ type VersionReply struct {
|
||||
func (x *VersionReply) Reset() {
|
||||
*x = VersionReply{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_agent_agentGrpc_agent_proto_msgTypes[11]
|
||||
mi := &file_agent_agentGrpc_agent_proto_msgTypes[13]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -726,7 +836,7 @@ func (x *VersionReply) String() string {
|
||||
func (*VersionReply) ProtoMessage() {}
|
||||
|
||||
func (x *VersionReply) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_agent_agentGrpc_agent_proto_msgTypes[11]
|
||||
mi := &file_agent_agentGrpc_agent_proto_msgTypes[13]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -739,7 +849,7 @@ func (x *VersionReply) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use VersionReply.ProtoReflect.Descriptor instead.
|
||||
func (*VersionReply) Descriptor() ([]byte, []int) {
|
||||
return file_agent_agentGrpc_agent_proto_rawDescGZIP(), []int{11}
|
||||
return file_agent_agentGrpc_agent_proto_rawDescGZIP(), []int{13}
|
||||
}
|
||||
|
||||
func (x *VersionReply) GetV() string {
|
||||
@ -761,101 +871,116 @@ var file_agent_agentGrpc_agent_proto_rawDesc = []byte{
|
||||
0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x28, 0x0a, 0x0f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f,
|
||||
0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x22,
|
||||
0x56, 0x0a, 0x10, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x53, 0x68, 0x61, 0x72, 0x65, 0x52, 0x65,
|
||||
0x70, 0x6c, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x2c, 0x0a, 0x11, 0x66, 0x72, 0x6f,
|
||||
0x6e, 0x74, 0x65, 0x6e, 0x64, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x02,
|
||||
0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x66, 0x72, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x64, 0x45, 0x6e,
|
||||
0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x22, 0x86, 0x03, 0x0a, 0x12, 0x50, 0x75, 0x62, 0x6c,
|
||||
0x69, 0x63, 0x53, 0x68, 0x61, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16,
|
||||
0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
|
||||
0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x62, 0x61, 0x73, 0x69, 0x63, 0x41,
|
||||
0x75, 0x74, 0x68, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x62, 0x61, 0x73, 0x69, 0x63,
|
||||
0x41, 0x75, 0x74, 0x68, 0x12, 0x2c, 0x0a, 0x11, 0x66, 0x72, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x64,
|
||||
0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52,
|
||||
0x11, 0x66, 0x72, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x64, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x4d, 0x6f, 0x64,
|
||||
0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64,
|
||||
0x4d, 0x6f, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65,
|
||||
0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65,
|
||||
0x12, 0x24, 0x0a, 0x0d, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65,
|
||||
0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x50, 0x72,
|
||||
0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x3c, 0x0a, 0x19, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x45,
|
||||
0x6d, 0x61, 0x69, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x50, 0x61, 0x74, 0x74, 0x65,
|
||||
0x72, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x19, 0x6f, 0x61, 0x75, 0x74, 0x68,
|
||||
0x45, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x50, 0x61, 0x74, 0x74,
|
||||
0x65, 0x72, 0x6e, 0x73, 0x12, 0x2e, 0x0a, 0x12, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x43, 0x68, 0x65,
|
||||
0x63, 0x6b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x12, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, 0x6e, 0x74, 0x65,
|
||||
0x72, 0x76, 0x61, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x18, 0x09,
|
||||
0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x12, 0x22, 0x0a, 0x0c,
|
||||
0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x18, 0x0a, 0x20, 0x03,
|
||||
0x28, 0x09, 0x52, 0x0c, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73,
|
||||
0x22, 0x29, 0x0a, 0x11, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x53, 0x68, 0x61, 0x72, 0x65,
|
||||
0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xa7, 0x01, 0x0a, 0x13,
|
||||
0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x53, 0x68, 0x61, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x62,
|
||||
0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x4d, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x0b, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x1a, 0x0a,
|
||||
0x08, 0x69, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52,
|
||||
0x08, 0x69, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6c, 0x6f,
|
||||
0x73, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x63, 0x6c, 0x6f, 0x73, 0x65,
|
||||
0x64, 0x12, 0x22, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x47, 0x72, 0x61, 0x6e, 0x74,
|
||||
0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x47,
|
||||
0x72, 0x61, 0x6e, 0x74, 0x73, 0x22, 0x2b, 0x0a, 0x13, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65,
|
||||
0x53, 0x68, 0x61, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05,
|
||||
0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b,
|
||||
0x65, 0x6e, 0x22, 0x13, 0x0a, 0x11, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x53, 0x68, 0x61,
|
||||
0x72, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x85, 0x02, 0x0a, 0x0b, 0x53, 0x68, 0x61, 0x72,
|
||||
0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1c, 0x0a,
|
||||
0x09, 0x73, 0x68, 0x61, 0x72, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x09, 0x73, 0x68, 0x61, 0x72, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x62,
|
||||
0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x4d, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x0b, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x1a, 0x0a,
|
||||
0x08, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52,
|
||||
0x08, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x12, 0x2a, 0x0a, 0x10, 0x66, 0x72, 0x6f,
|
||||
0x6e, 0x74, 0x65, 0x6e, 0x64, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x05, 0x20,
|
||||
0x03, 0x28, 0x09, 0x52, 0x10, 0x66, 0x72, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x64, 0x45, 0x6e, 0x64,
|
||||
0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64,
|
||||
0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f,
|
||||
0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12,
|
||||
0x16, 0x0a, 0x06, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52,
|
||||
0x06, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75,
|
||||
0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22,
|
||||
0x0f, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x22, 0x5e, 0x0a, 0x0b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12,
|
||||
0x29, 0x0a, 0x08, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
|
||||
0x0b, 0x32, 0x0d, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c,
|
||||
0x52, 0x08, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x06, 0x73, 0x68,
|
||||
0x61, 0x72, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x53, 0x68, 0x61,
|
||||
0x72, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x06, 0x73, 0x68, 0x61, 0x72, 0x65, 0x73,
|
||||
0x22, 0x10, 0x0a, 0x0e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x22, 0x1c, 0x0a, 0x0c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x70,
|
||||
0x6c, 0x79, 0x12, 0x0c, 0x0a, 0x01, 0x76, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x76,
|
||||
0x32, 0x8f, 0x02, 0x0a, 0x05, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x37, 0x0a, 0x0b, 0x50, 0x75,
|
||||
0x62, 0x6c, 0x69, 0x63, 0x53, 0x68, 0x61, 0x72, 0x65, 0x12, 0x13, 0x2e, 0x50, 0x75, 0x62, 0x6c,
|
||||
0x69, 0x63, 0x53, 0x68, 0x61, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11,
|
||||
0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x53, 0x68, 0x61, 0x72, 0x65, 0x52, 0x65, 0x70, 0x6c,
|
||||
0x79, 0x22, 0x00, 0x12, 0x3a, 0x0a, 0x0c, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x53, 0x68,
|
||||
0x61, 0x72, 0x65, 0x12, 0x14, 0x2e, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x53, 0x68, 0x61,
|
||||
0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x50, 0x72, 0x69, 0x76,
|
||||
0x61, 0x74, 0x65, 0x53, 0x68, 0x61, 0x72, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12,
|
||||
0x3a, 0x0a, 0x0c, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x53, 0x68, 0x61, 0x72, 0x65, 0x12,
|
||||
0x14, 0x2e, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x53, 0x68, 0x61, 0x72, 0x65, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x53,
|
||||
0x68, 0x61, 0x72, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x28, 0x0a, 0x06, 0x53,
|
||||
0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0e, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0c, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65,
|
||||
0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x2b, 0x0a, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
|
||||
0x12, 0x0f, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x1a, 0x0d, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79,
|
||||
0x22, 0x00, 0x42, 0x2a, 0x5a, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d,
|
||||
0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x7a, 0x69, 0x74, 0x69, 0x2f, 0x7a, 0x72, 0x6f, 0x6b, 0x2f, 0x61,
|
||||
0x67, 0x65, 0x6e, 0x74, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x70, 0x63, 0x62, 0x06,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x3a, 0x0a, 0x12, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73,
|
||||
0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x24, 0x0a, 0x0d, 0x66, 0x72, 0x6f, 0x6e, 0x74, 0x65, 0x6e,
|
||||
0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x66, 0x72,
|
||||
0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x78, 0x0a, 0x14, 0x50,
|
||||
0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x62, 0x69, 0x6e,
|
||||
0x64, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b,
|
||||
0x62, 0x69, 0x6e, 0x64, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x28, 0x0a, 0x0f, 0x72,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x03,
|
||||
0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65,
|
||||
0x61, 0x64, 0x65, 0x72, 0x73, 0x22, 0x29, 0x0a, 0x11, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65,
|
||||
0x53, 0x68, 0x61, 0x72, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f,
|
||||
0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e,
|
||||
0x22, 0xa7, 0x01, 0x0a, 0x13, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x53, 0x68, 0x61, 0x72,
|
||||
0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67,
|
||||
0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74,
|
||||
0x12, 0x20, 0x0a, 0x0b, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x4d, 0x6f, 0x64, 0x65, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x4d, 0x6f,
|
||||
0x64, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x12, 0x16,
|
||||
0x0a, 0x06, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06,
|
||||
0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73,
|
||||
0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x63,
|
||||
0x63, 0x65, 0x73, 0x73, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x22, 0x56, 0x0a, 0x10, 0x50, 0x75,
|
||||
0x62, 0x6c, 0x69, 0x63, 0x53, 0x68, 0x61, 0x72, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x14,
|
||||
0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74,
|
||||
0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x2c, 0x0a, 0x11, 0x66, 0x72, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x64,
|
||||
0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52,
|
||||
0x11, 0x66, 0x72, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x64, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e,
|
||||
0x74, 0x73, 0x22, 0x86, 0x03, 0x0a, 0x12, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x53, 0x68, 0x61,
|
||||
0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x72,
|
||||
0x67, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65,
|
||||
0x74, 0x12, 0x1c, 0x0a, 0x09, 0x62, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x18, 0x02,
|
||||
0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x62, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x12,
|
||||
0x2c, 0x0a, 0x11, 0x66, 0x72, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x64, 0x53, 0x65, 0x6c, 0x65, 0x63,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x66, 0x72, 0x6f, 0x6e,
|
||||
0x74, 0x65, 0x6e, 0x64, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a,
|
||||
0x0b, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x4d, 0x6f, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x0b, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x4d, 0x6f, 0x64, 0x65, 0x12,
|
||||
0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28,
|
||||
0x08, 0x52, 0x08, 0x69, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x6f,
|
||||
0x61, 0x75, 0x74, 0x68, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x0d, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65,
|
||||
0x72, 0x12, 0x3c, 0x0a, 0x19, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x41,
|
||||
0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x73, 0x18, 0x07,
|
||||
0x20, 0x03, 0x28, 0x09, 0x52, 0x19, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x45, 0x6d, 0x61, 0x69, 0x6c,
|
||||
0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x73, 0x12,
|
||||
0x2e, 0x0a, 0x12, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, 0x6e, 0x74,
|
||||
0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x6f, 0x61, 0x75,
|
||||
0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12,
|
||||
0x16, 0x0a, 0x06, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52,
|
||||
0x06, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x65, 0x73,
|
||||
0x73, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x61,
|
||||
0x63, 0x63, 0x65, 0x73, 0x73, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x22, 0x2b, 0x0a, 0x13, 0x52,
|
||||
0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x53, 0x68, 0x61, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x13, 0x0a, 0x11, 0x52, 0x65, 0x6c, 0x65,
|
||||
0x61, 0x73, 0x65, 0x53, 0x68, 0x61, 0x72, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x85, 0x02,
|
||||
0x0a, 0x0b, 0x53, 0x68, 0x61, 0x72, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x14, 0x0a,
|
||||
0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f,
|
||||
0x6b, 0x65, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x68, 0x61, 0x72, 0x65, 0x4d, 0x6f, 0x64, 0x65,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x68, 0x61, 0x72, 0x65, 0x4d, 0x6f, 0x64,
|
||||
0x65, 0x12, 0x20, 0x0a, 0x0b, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x4d, 0x6f, 0x64, 0x65,
|
||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x4d,
|
||||
0x6f, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x18,
|
||||
0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x12,
|
||||
0x2a, 0x0a, 0x10, 0x66, 0x72, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x64, 0x45, 0x6e, 0x64, 0x70, 0x6f,
|
||||
0x69, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x66, 0x72, 0x6f, 0x6e, 0x74,
|
||||
0x65, 0x6e, 0x64, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x62,
|
||||
0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x06,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x45, 0x6e, 0x64,
|
||||
0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x18,
|
||||
0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x12, 0x16, 0x0a,
|
||||
0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73,
|
||||
0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x0f, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x5e, 0x0a, 0x0b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
|
||||
0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x29, 0x0a, 0x08, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x65,
|
||||
0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73,
|
||||
0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x08, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x65, 0x73,
|
||||
0x12, 0x24, 0x0a, 0x06, 0x73, 0x68, 0x61, 0x72, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b,
|
||||
0x32, 0x0c, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x06,
|
||||
0x73, 0x68, 0x61, 0x72, 0x65, 0x73, 0x22, 0x10, 0x0a, 0x0e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f,
|
||||
0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x1c, 0x0a, 0x0c, 0x56, 0x65, 0x72, 0x73,
|
||||
0x69, 0x6f, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x0c, 0x0a, 0x01, 0x76, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x01, 0x76, 0x32, 0xce, 0x02, 0x0a, 0x05, 0x41, 0x67, 0x65, 0x6e, 0x74,
|
||||
0x12, 0x3d, 0x0a, 0x0d, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x65, 0x73,
|
||||
0x73, 0x12, 0x15, 0x2e, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x65, 0x73,
|
||||
0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x50, 0x72, 0x69, 0x76, 0x61,
|
||||
0x74, 0x65, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12,
|
||||
0x3a, 0x0a, 0x0c, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x53, 0x68, 0x61, 0x72, 0x65, 0x12,
|
||||
0x14, 0x2e, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x53, 0x68, 0x61, 0x72, 0x65, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x53,
|
||||
0x68, 0x61, 0x72, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x37, 0x0a, 0x0b, 0x50,
|
||||
0x75, 0x62, 0x6c, 0x69, 0x63, 0x53, 0x68, 0x61, 0x72, 0x65, 0x12, 0x13, 0x2e, 0x50, 0x75, 0x62,
|
||||
0x6c, 0x69, 0x63, 0x53, 0x68, 0x61, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
|
||||
0x11, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x53, 0x68, 0x61, 0x72, 0x65, 0x52, 0x65, 0x70,
|
||||
0x6c, 0x79, 0x22, 0x00, 0x12, 0x3a, 0x0a, 0x0c, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x53,
|
||||
0x68, 0x61, 0x72, 0x65, 0x12, 0x14, 0x2e, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x53, 0x68,
|
||||
0x61, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x52, 0x65, 0x6c,
|
||||
0x65, 0x61, 0x73, 0x65, 0x53, 0x68, 0x61, 0x72, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00,
|
||||
0x12, 0x28, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0e, 0x2e, 0x53, 0x74, 0x61,
|
||||
0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0c, 0x2e, 0x53, 0x74, 0x61,
|
||||
0x74, 0x75, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x2b, 0x0a, 0x07, 0x56, 0x65,
|
||||
0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x0f, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
|
||||
0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x42, 0x2a, 0x5a, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75,
|
||||
0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x7a, 0x69, 0x74, 0x69, 0x2f, 0x7a,
|
||||
0x72, 0x6f, 0x6b, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x47,
|
||||
0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@ -870,36 +995,40 @@ func file_agent_agentGrpc_agent_proto_rawDescGZIP() []byte {
|
||||
return file_agent_agentGrpc_agent_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_agent_agentGrpc_agent_proto_msgTypes = make([]protoimpl.MessageInfo, 12)
|
||||
var file_agent_agentGrpc_agent_proto_msgTypes = make([]protoimpl.MessageInfo, 14)
|
||||
var file_agent_agentGrpc_agent_proto_goTypes = []any{
|
||||
(*AccessDetail)(nil), // 0: AccessDetail
|
||||
(*PublicShareReply)(nil), // 1: PublicShareReply
|
||||
(*PublicShareRequest)(nil), // 2: PublicShareRequest
|
||||
(*PrivateAccessReply)(nil), // 1: PrivateAccessReply
|
||||
(*PrivateAccessRequest)(nil), // 2: PrivateAccessRequest
|
||||
(*PrivateShareReply)(nil), // 3: PrivateShareReply
|
||||
(*PrivateShareRequest)(nil), // 4: PrivateShareRequest
|
||||
(*ReleaseShareRequest)(nil), // 5: ReleaseShareRequest
|
||||
(*ReleaseShareReply)(nil), // 6: ReleaseShareReply
|
||||
(*ShareDetail)(nil), // 7: ShareDetail
|
||||
(*StatusRequest)(nil), // 8: StatusRequest
|
||||
(*StatusReply)(nil), // 9: StatusReply
|
||||
(*VersionRequest)(nil), // 10: VersionRequest
|
||||
(*VersionReply)(nil), // 11: VersionReply
|
||||
(*PublicShareReply)(nil), // 5: PublicShareReply
|
||||
(*PublicShareRequest)(nil), // 6: PublicShareRequest
|
||||
(*ReleaseShareRequest)(nil), // 7: ReleaseShareRequest
|
||||
(*ReleaseShareReply)(nil), // 8: ReleaseShareReply
|
||||
(*ShareDetail)(nil), // 9: ShareDetail
|
||||
(*StatusRequest)(nil), // 10: StatusRequest
|
||||
(*StatusReply)(nil), // 11: StatusReply
|
||||
(*VersionRequest)(nil), // 12: VersionRequest
|
||||
(*VersionReply)(nil), // 13: VersionReply
|
||||
}
|
||||
var file_agent_agentGrpc_agent_proto_depIdxs = []int32{
|
||||
0, // 0: StatusReply.accesses:type_name -> AccessDetail
|
||||
7, // 1: StatusReply.shares:type_name -> ShareDetail
|
||||
2, // 2: Agent.PublicShare:input_type -> PublicShareRequest
|
||||
9, // 1: StatusReply.shares:type_name -> ShareDetail
|
||||
2, // 2: Agent.PrivateAccess:input_type -> PrivateAccessRequest
|
||||
4, // 3: Agent.PrivateShare:input_type -> PrivateShareRequest
|
||||
5, // 4: Agent.ReleaseShare:input_type -> ReleaseShareRequest
|
||||
8, // 5: Agent.Status:input_type -> StatusRequest
|
||||
10, // 6: Agent.Version:input_type -> VersionRequest
|
||||
1, // 7: Agent.PublicShare:output_type -> PublicShareReply
|
||||
3, // 8: Agent.PrivateShare:output_type -> PrivateShareReply
|
||||
6, // 9: Agent.ReleaseShare:output_type -> ReleaseShareReply
|
||||
9, // 10: Agent.Status:output_type -> StatusReply
|
||||
11, // 11: Agent.Version:output_type -> VersionReply
|
||||
7, // [7:12] is the sub-list for method output_type
|
||||
2, // [2:7] is the sub-list for method input_type
|
||||
6, // 4: Agent.PublicShare:input_type -> PublicShareRequest
|
||||
7, // 5: Agent.ReleaseShare:input_type -> ReleaseShareRequest
|
||||
10, // 6: Agent.Status:input_type -> StatusRequest
|
||||
12, // 7: Agent.Version:input_type -> VersionRequest
|
||||
1, // 8: Agent.PrivateAccess:output_type -> PrivateAccessReply
|
||||
3, // 9: Agent.PrivateShare:output_type -> PrivateShareReply
|
||||
5, // 10: Agent.PublicShare:output_type -> PublicShareReply
|
||||
8, // 11: Agent.ReleaseShare:output_type -> ReleaseShareReply
|
||||
11, // 12: Agent.Status:output_type -> StatusReply
|
||||
13, // 13: Agent.Version:output_type -> VersionReply
|
||||
8, // [8:14] is the sub-list for method output_type
|
||||
2, // [2:8] is the sub-list for method input_type
|
||||
2, // [2:2] is the sub-list for extension type_name
|
||||
2, // [2:2] is the sub-list for extension extendee
|
||||
0, // [0:2] is the sub-list for field type_name
|
||||
@ -924,7 +1053,7 @@ func file_agent_agentGrpc_agent_proto_init() {
|
||||
}
|
||||
}
|
||||
file_agent_agentGrpc_agent_proto_msgTypes[1].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*PublicShareReply); i {
|
||||
switch v := v.(*PrivateAccessReply); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
@ -936,7 +1065,7 @@ func file_agent_agentGrpc_agent_proto_init() {
|
||||
}
|
||||
}
|
||||
file_agent_agentGrpc_agent_proto_msgTypes[2].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*PublicShareRequest); i {
|
||||
switch v := v.(*PrivateAccessRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
@ -972,7 +1101,7 @@ func file_agent_agentGrpc_agent_proto_init() {
|
||||
}
|
||||
}
|
||||
file_agent_agentGrpc_agent_proto_msgTypes[5].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*ReleaseShareRequest); i {
|
||||
switch v := v.(*PublicShareReply); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
@ -984,7 +1113,7 @@ func file_agent_agentGrpc_agent_proto_init() {
|
||||
}
|
||||
}
|
||||
file_agent_agentGrpc_agent_proto_msgTypes[6].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*ReleaseShareReply); i {
|
||||
switch v := v.(*PublicShareRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
@ -996,7 +1125,7 @@ func file_agent_agentGrpc_agent_proto_init() {
|
||||
}
|
||||
}
|
||||
file_agent_agentGrpc_agent_proto_msgTypes[7].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*ShareDetail); i {
|
||||
switch v := v.(*ReleaseShareRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
@ -1008,7 +1137,7 @@ func file_agent_agentGrpc_agent_proto_init() {
|
||||
}
|
||||
}
|
||||
file_agent_agentGrpc_agent_proto_msgTypes[8].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*StatusRequest); i {
|
||||
switch v := v.(*ReleaseShareReply); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
@ -1020,7 +1149,7 @@ func file_agent_agentGrpc_agent_proto_init() {
|
||||
}
|
||||
}
|
||||
file_agent_agentGrpc_agent_proto_msgTypes[9].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*StatusReply); i {
|
||||
switch v := v.(*ShareDetail); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
@ -1032,7 +1161,7 @@ func file_agent_agentGrpc_agent_proto_init() {
|
||||
}
|
||||
}
|
||||
file_agent_agentGrpc_agent_proto_msgTypes[10].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*VersionRequest); i {
|
||||
switch v := v.(*StatusRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
@ -1044,6 +1173,30 @@ func file_agent_agentGrpc_agent_proto_init() {
|
||||
}
|
||||
}
|
||||
file_agent_agentGrpc_agent_proto_msgTypes[11].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*StatusReply); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_agent_agentGrpc_agent_proto_msgTypes[12].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*VersionRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_agent_agentGrpc_agent_proto_msgTypes[13].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*VersionReply); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -1062,7 +1215,7 @@ func file_agent_agentGrpc_agent_proto_init() {
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_agent_agentGrpc_agent_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 12,
|
||||
NumMessages: 14,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
|
@ -3,8 +3,9 @@ syntax = "proto3";
|
||||
option go_package = "github.com/openziti/zrok/agent/agentGrpc";
|
||||
|
||||
service Agent {
|
||||
rpc PublicShare(PublicShareRequest) returns (PublicShareReply) {}
|
||||
rpc PrivateAccess(PrivateAccessRequest) returns (PrivateAccessReply) {}
|
||||
rpc PrivateShare(PrivateShareRequest) returns (PrivateShareReply) {}
|
||||
rpc PublicShare(PublicShareRequest) returns (PublicShareReply) {}
|
||||
rpc ReleaseShare(ReleaseShareRequest) returns (ReleaseShareReply) {}
|
||||
rpc Status(StatusRequest) returns (StatusReply) {}
|
||||
rpc Version(VersionRequest) returns (VersionReply) {}
|
||||
@ -16,6 +17,28 @@ message AccessDetail {
|
||||
repeated string responseHeaders = 3;
|
||||
}
|
||||
|
||||
message PrivateAccessReply{
|
||||
string frontendToken = 1;
|
||||
}
|
||||
|
||||
message PrivateAccessRequest{
|
||||
string token = 1;
|
||||
string bindAddress = 2;
|
||||
repeated string responseHeaders = 3;
|
||||
}
|
||||
|
||||
message PrivateShareReply {
|
||||
string token = 1;
|
||||
}
|
||||
|
||||
message PrivateShareRequest {
|
||||
string target = 1;
|
||||
string backendMode = 2;
|
||||
bool insecure = 3;
|
||||
bool closed = 4;
|
||||
repeated string accessGrants = 5;
|
||||
}
|
||||
|
||||
message PublicShareReply {
|
||||
string token = 1;
|
||||
repeated string frontendEndpoints = 2;
|
||||
@ -34,18 +57,6 @@ message PublicShareRequest {
|
||||
repeated string accessGrants = 10;
|
||||
}
|
||||
|
||||
message PrivateShareReply {
|
||||
string token = 1;
|
||||
}
|
||||
|
||||
message PrivateShareRequest {
|
||||
string target = 1;
|
||||
string backendMode = 2;
|
||||
bool insecure = 3;
|
||||
bool closed = 4;
|
||||
repeated string accessGrants = 5;
|
||||
}
|
||||
|
||||
message ReleaseShareRequest {
|
||||
string token = 1;
|
||||
}
|
||||
|
@ -19,8 +19,9 @@ import (
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
Agent_PublicShare_FullMethodName = "/Agent/PublicShare"
|
||||
Agent_PrivateAccess_FullMethodName = "/Agent/PrivateAccess"
|
||||
Agent_PrivateShare_FullMethodName = "/Agent/PrivateShare"
|
||||
Agent_PublicShare_FullMethodName = "/Agent/PublicShare"
|
||||
Agent_ReleaseShare_FullMethodName = "/Agent/ReleaseShare"
|
||||
Agent_Status_FullMethodName = "/Agent/Status"
|
||||
Agent_Version_FullMethodName = "/Agent/Version"
|
||||
@ -30,8 +31,9 @@ const (
|
||||
//
|
||||
// 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 AgentClient interface {
|
||||
PublicShare(ctx context.Context, in *PublicShareRequest, opts ...grpc.CallOption) (*PublicShareReply, error)
|
||||
PrivateAccess(ctx context.Context, in *PrivateAccessRequest, opts ...grpc.CallOption) (*PrivateAccessReply, error)
|
||||
PrivateShare(ctx context.Context, in *PrivateShareRequest, opts ...grpc.CallOption) (*PrivateShareReply, error)
|
||||
PublicShare(ctx context.Context, in *PublicShareRequest, opts ...grpc.CallOption) (*PublicShareReply, error)
|
||||
ReleaseShare(ctx context.Context, in *ReleaseShareRequest, opts ...grpc.CallOption) (*ReleaseShareReply, error)
|
||||
Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
Version(ctx context.Context, in *VersionRequest, opts ...grpc.CallOption) (*VersionReply, error)
|
||||
@ -45,10 +47,10 @@ func NewAgentClient(cc grpc.ClientConnInterface) AgentClient {
|
||||
return &agentClient{cc}
|
||||
}
|
||||
|
||||
func (c *agentClient) PublicShare(ctx context.Context, in *PublicShareRequest, opts ...grpc.CallOption) (*PublicShareReply, error) {
|
||||
func (c *agentClient) PrivateAccess(ctx context.Context, in *PrivateAccessRequest, opts ...grpc.CallOption) (*PrivateAccessReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(PublicShareReply)
|
||||
err := c.cc.Invoke(ctx, Agent_PublicShare_FullMethodName, in, out, cOpts...)
|
||||
out := new(PrivateAccessReply)
|
||||
err := c.cc.Invoke(ctx, Agent_PrivateAccess_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -65,6 +67,16 @@ func (c *agentClient) PrivateShare(ctx context.Context, in *PrivateShareRequest,
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *agentClient) PublicShare(ctx context.Context, in *PublicShareRequest, opts ...grpc.CallOption) (*PublicShareReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(PublicShareReply)
|
||||
err := c.cc.Invoke(ctx, Agent_PublicShare_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *agentClient) ReleaseShare(ctx context.Context, in *ReleaseShareRequest, opts ...grpc.CallOption) (*ReleaseShareReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(ReleaseShareReply)
|
||||
@ -99,8 +111,9 @@ func (c *agentClient) Version(ctx context.Context, in *VersionRequest, opts ...g
|
||||
// All implementations must embed UnimplementedAgentServer
|
||||
// for forward compatibility.
|
||||
type AgentServer interface {
|
||||
PublicShare(context.Context, *PublicShareRequest) (*PublicShareReply, error)
|
||||
PrivateAccess(context.Context, *PrivateAccessRequest) (*PrivateAccessReply, error)
|
||||
PrivateShare(context.Context, *PrivateShareRequest) (*PrivateShareReply, error)
|
||||
PublicShare(context.Context, *PublicShareRequest) (*PublicShareReply, error)
|
||||
ReleaseShare(context.Context, *ReleaseShareRequest) (*ReleaseShareReply, error)
|
||||
Status(context.Context, *StatusRequest) (*StatusReply, error)
|
||||
Version(context.Context, *VersionRequest) (*VersionReply, error)
|
||||
@ -114,12 +127,15 @@ type AgentServer interface {
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedAgentServer struct{}
|
||||
|
||||
func (UnimplementedAgentServer) PublicShare(context.Context, *PublicShareRequest) (*PublicShareReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method PublicShare not implemented")
|
||||
func (UnimplementedAgentServer) PrivateAccess(context.Context, *PrivateAccessRequest) (*PrivateAccessReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method PrivateAccess not implemented")
|
||||
}
|
||||
func (UnimplementedAgentServer) PrivateShare(context.Context, *PrivateShareRequest) (*PrivateShareReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method PrivateShare not implemented")
|
||||
}
|
||||
func (UnimplementedAgentServer) PublicShare(context.Context, *PublicShareRequest) (*PublicShareReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method PublicShare not implemented")
|
||||
}
|
||||
func (UnimplementedAgentServer) ReleaseShare(context.Context, *ReleaseShareRequest) (*ReleaseShareReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ReleaseShare not implemented")
|
||||
}
|
||||
@ -150,20 +166,20 @@ func RegisterAgentServer(s grpc.ServiceRegistrar, srv AgentServer) {
|
||||
s.RegisterService(&Agent_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _Agent_PublicShare_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(PublicShareRequest)
|
||||
func _Agent_PrivateAccess_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(PrivateAccessRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AgentServer).PublicShare(ctx, in)
|
||||
return srv.(AgentServer).PrivateAccess(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Agent_PublicShare_FullMethodName,
|
||||
FullMethod: Agent_PrivateAccess_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AgentServer).PublicShare(ctx, req.(*PublicShareRequest))
|
||||
return srv.(AgentServer).PrivateAccess(ctx, req.(*PrivateAccessRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
@ -186,6 +202,24 @@ func _Agent_PrivateShare_Handler(srv interface{}, ctx context.Context, dec func(
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Agent_PublicShare_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(PublicShareRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AgentServer).PublicShare(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Agent_PublicShare_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AgentServer).PublicShare(ctx, req.(*PublicShareRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Agent_ReleaseShare_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ReleaseShareRequest)
|
||||
if err := dec(in); err != nil {
|
||||
@ -248,13 +282,17 @@ var Agent_ServiceDesc = grpc.ServiceDesc{
|
||||
HandlerType: (*AgentServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "PublicShare",
|
||||
Handler: _Agent_PublicShare_Handler,
|
||||
MethodName: "PrivateAccess",
|
||||
Handler: _Agent_PrivateAccess_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "PrivateShare",
|
||||
Handler: _Agent_PrivateShare_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "PublicShare",
|
||||
Handler: _Agent_PublicShare_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ReleaseShare",
|
||||
Handler: _Agent_ReleaseShare_Handler,
|
||||
|
48
agent/privateAccess.go
Normal file
48
agent/privateAccess.go
Normal file
@ -0,0 +1,48 @@
|
||||
package agent
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"github.com/openziti/zrok/agent/agentGrpc"
|
||||
"github.com/openziti/zrok/agent/proctree"
|
||||
"github.com/openziti/zrok/environment"
|
||||
"github.com/sirupsen/logrus"
|
||||
"os"
|
||||
)
|
||||
|
||||
func (i *agentGrpcImpl) PrivateAccess(_ context.Context, req *agentGrpc.PrivateAccessRequest) (*agentGrpc.PrivateAccessReply, error) {
|
||||
root, err := environment.LoadRoot()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if !root.IsEnabled() {
|
||||
return nil, errors.New("unable to load environment; did you 'zrok enable'?")
|
||||
}
|
||||
|
||||
accCmd := []string{os.Args[0], "access", "private", "--agent", "-b", req.BindAddress, req.Token}
|
||||
acc := &access{
|
||||
token: req.Token,
|
||||
bindAddress: req.BindAddress,
|
||||
responseHeaders: req.ResponseHeaders,
|
||||
bootComplete: make(chan struct{}),
|
||||
a: i.a,
|
||||
}
|
||||
|
||||
logrus.Infof("executing '%v'", accCmd)
|
||||
|
||||
acc.process, err = proctree.StartChild(acc.tail, accCmd...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
go acc.monitor()
|
||||
<-acc.bootComplete
|
||||
|
||||
if acc.bootErr == nil {
|
||||
i.a.inAccesses <- acc
|
||||
return &agentGrpc.PrivateAccessReply{FrontendToken: acc.frontendToken}, nil
|
||||
}
|
||||
|
||||
return nil, acc.bootErr
|
||||
}
|
Loading…
Reference in New Issue
Block a user