use meta and link_control from link proto (#18290)

This commit is contained in:
Chris Capurso 2022-12-09 12:35:06 -05:00 committed by GitHub
parent c81485d5cd
commit 42f36605c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 21 additions and 1176 deletions

2
go.mod
View File

@ -138,7 +138,7 @@ require (
github.com/hashicorp/vault/api/auth/approle v0.1.0
github.com/hashicorp/vault/api/auth/userpass v0.1.0
github.com/hashicorp/vault/sdk v0.6.1
github.com/hashicorp/vault/vault/hcp_link/proto v0.0.0-20221202210228-12b2fab87559
github.com/hashicorp/vault/vault/hcp_link/proto v0.0.0-20221209165735-a2eed407e08d
github.com/influxdata/influxdb1-client v0.0.0-20200827194710-b269163b24ab
github.com/jackc/pgx/v4 v4.15.0
github.com/jcmturner/gokrb5/v8 v8.4.2

2
go.sum
View File

@ -1172,6 +1172,8 @@ github.com/hashicorp/vault-testing-stepwise v0.1.2 h1:3obC/ziAPGnsz2IQxr5e4Ayb7t
github.com/hashicorp/vault-testing-stepwise v0.1.2/go.mod h1:TeU6B+5NqxUjto+Zey+QQEH1iywuHn0ciHZNYh4q3uI=
github.com/hashicorp/vault/vault/hcp_link/proto v0.0.0-20221202210228-12b2fab87559 h1:fCQL4JFn/iQJsM3eQPDGtiGxEXEE+A3Yv4TBwk8IJAA=
github.com/hashicorp/vault/vault/hcp_link/proto v0.0.0-20221202210228-12b2fab87559/go.mod h1:hsrm1EXNYpQwErumOLeaTY74+Tj7poOwckbR4d+0hEQ=
github.com/hashicorp/vault/vault/hcp_link/proto v0.0.0-20221209165735-a2eed407e08d h1:U692VbDl6ww5GQsNFClJVFJDaPeuqtDt1Mwqf21KYek=
github.com/hashicorp/vault/vault/hcp_link/proto v0.0.0-20221209165735-a2eed407e08d/go.mod h1:a2crHoMWwY6aiL8GWT8hYj7vKD64uX0EdRPbnsHF5wU=
github.com/hashicorp/vic v1.5.1-0.20190403131502-bbfe86ec9443 h1:O/pT5C1Q3mVXMyuqg7yuAWUg/jMZR1/0QTzTRdNR6Uw=
github.com/hashicorp/vic v1.5.1-0.20190403131502-bbfe86ec9443/go.mod h1:bEpDU35nTu0ey1EXjwNwPjI9xErAsoOCmcMb9GKvyxo=
github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM=

View File

@ -13,6 +13,7 @@ import (
"github.com/hashicorp/vault/vault/cluster"
"github.com/hashicorp/vault/vault/hcp_link/capabilities"
"github.com/hashicorp/vault/vault/hcp_link/internal"
"github.com/hashicorp/vault/vault/hcp_link/proto/link_control"
"google.golang.org/grpc"
"google.golang.org/grpc/keepalive"
"google.golang.org/grpc/reflection"
@ -21,7 +22,7 @@ import (
type purgePolicyFunc func()
type hcpLinkControlHandler struct {
UnimplementedHCPLinkControlServer
link_control.UnimplementedHCPLinkControlServer
purgeFunc purgePolicyFunc
wrappedCore internal.WrappedCoreStandbyStates
@ -53,7 +54,7 @@ func NewHCPLinkControlService(scadaProvider scada.SCADAProvider, core *vault.Cor
wrappedCore: core,
}
RegisterHCPLinkControlServer(grpcServer, handler)
link_control.RegisterHCPLinkControlServer(grpcServer, handler)
reflection.Register(grpcServer)
return handler
@ -109,7 +110,7 @@ func (h *hcpLinkControlHandler) Stop() error {
return nil
}
func (h *hcpLinkControlHandler) PurgePolicy(ctx context.Context, req *PurgePolicyRequest) (*PurgePolicyResponse, error) {
func (h *hcpLinkControlHandler) PurgePolicy(ctx context.Context, req *link_control.PurgePolicyRequest) (*link_control.PurgePolicyResponse, error) {
standby, perfStandby := h.wrappedCore.StandbyStates()
// only purging an active node, perf/standby nodes should purge
// automatically
@ -120,5 +121,5 @@ func (h *hcpLinkControlHandler) PurgePolicy(ctx context.Context, req *PurgePolic
h.logger.Debug("Purged token and policy")
}
return &PurgePolicyResponse{}, nil
return &link_control.PurgePolicyResponse{}, nil
}

View File

@ -1,199 +0,0 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.1
// protoc v3.21.9
// source: vault/hcp_link/capabilities/link_control/link_control.proto
package link_control
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type PurgePolicyRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *PurgePolicyRequest) Reset() {
*x = PurgePolicyRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_vault_hcp_link_capabilities_link_control_link_control_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PurgePolicyRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PurgePolicyRequest) ProtoMessage() {}
func (x *PurgePolicyRequest) ProtoReflect() protoreflect.Message {
mi := &file_vault_hcp_link_capabilities_link_control_link_control_proto_msgTypes[0]
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 PurgePolicyRequest.ProtoReflect.Descriptor instead.
func (*PurgePolicyRequest) Descriptor() ([]byte, []int) {
return file_vault_hcp_link_capabilities_link_control_link_control_proto_rawDescGZIP(), []int{0}
}
type PurgePolicyResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *PurgePolicyResponse) Reset() {
*x = PurgePolicyResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_vault_hcp_link_capabilities_link_control_link_control_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PurgePolicyResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PurgePolicyResponse) ProtoMessage() {}
func (x *PurgePolicyResponse) ProtoReflect() protoreflect.Message {
mi := &file_vault_hcp_link_capabilities_link_control_link_control_proto_msgTypes[1]
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 PurgePolicyResponse.ProtoReflect.Descriptor instead.
func (*PurgePolicyResponse) Descriptor() ([]byte, []int) {
return file_vault_hcp_link_capabilities_link_control_link_control_proto_rawDescGZIP(), []int{1}
}
var File_vault_hcp_link_capabilities_link_control_link_control_proto protoreflect.FileDescriptor
var file_vault_hcp_link_capabilities_link_control_link_control_proto_rawDesc = []byte{
0x0a, 0x3b, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x68, 0x63, 0x70, 0x5f, 0x6c, 0x69, 0x6e, 0x6b,
0x2f, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x6c, 0x69,
0x6e, 0x6b, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2f, 0x6c, 0x69, 0x6e, 0x6b, 0x5f,
0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x6c,
0x69, 0x6e, 0x6b, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x22, 0x14, 0x0a, 0x12, 0x50,
0x75, 0x72, 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x22, 0x15, 0x0a, 0x13, 0x50, 0x75, 0x72, 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x64, 0x0a, 0x0e, 0x48, 0x43, 0x50, 0x4c,
0x69, 0x6e, 0x6b, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x12, 0x52, 0x0a, 0x0b, 0x50, 0x75,
0x72, 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x20, 0x2e, 0x6c, 0x69, 0x6e, 0x6b,
0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x50, 0x75, 0x72, 0x67, 0x65, 0x50, 0x6f,
0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6c, 0x69,
0x6e, 0x6b, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x50, 0x75, 0x72, 0x67, 0x65,
0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x45,
0x5a, 0x43, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73,
0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x61, 0x75,
0x6c, 0x74, 0x2f, 0x68, 0x63, 0x70, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x2f, 0x63, 0x61, 0x70, 0x61,
0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x63, 0x6f,
0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_vault_hcp_link_capabilities_link_control_link_control_proto_rawDescOnce sync.Once
file_vault_hcp_link_capabilities_link_control_link_control_proto_rawDescData = file_vault_hcp_link_capabilities_link_control_link_control_proto_rawDesc
)
func file_vault_hcp_link_capabilities_link_control_link_control_proto_rawDescGZIP() []byte {
file_vault_hcp_link_capabilities_link_control_link_control_proto_rawDescOnce.Do(func() {
file_vault_hcp_link_capabilities_link_control_link_control_proto_rawDescData = protoimpl.X.CompressGZIP(file_vault_hcp_link_capabilities_link_control_link_control_proto_rawDescData)
})
return file_vault_hcp_link_capabilities_link_control_link_control_proto_rawDescData
}
var file_vault_hcp_link_capabilities_link_control_link_control_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_vault_hcp_link_capabilities_link_control_link_control_proto_goTypes = []interface{}{
(*PurgePolicyRequest)(nil), // 0: link_control.PurgePolicyRequest
(*PurgePolicyResponse)(nil), // 1: link_control.PurgePolicyResponse
}
var file_vault_hcp_link_capabilities_link_control_link_control_proto_depIdxs = []int32{
0, // 0: link_control.HCPLinkControl.PurgePolicy:input_type -> link_control.PurgePolicyRequest
1, // 1: link_control.HCPLinkControl.PurgePolicy:output_type -> link_control.PurgePolicyResponse
1, // [1:2] is the sub-list for method output_type
0, // [0:1] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_vault_hcp_link_capabilities_link_control_link_control_proto_init() }
func file_vault_hcp_link_capabilities_link_control_link_control_proto_init() {
if File_vault_hcp_link_capabilities_link_control_link_control_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_vault_hcp_link_capabilities_link_control_link_control_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PurgePolicyRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_vault_hcp_link_capabilities_link_control_link_control_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PurgePolicyResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_vault_hcp_link_capabilities_link_control_link_control_proto_rawDesc,
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_vault_hcp_link_capabilities_link_control_link_control_proto_goTypes,
DependencyIndexes: file_vault_hcp_link_capabilities_link_control_link_control_proto_depIdxs,
MessageInfos: file_vault_hcp_link_capabilities_link_control_link_control_proto_msgTypes,
}.Build()
File_vault_hcp_link_capabilities_link_control_link_control_proto = out.File
file_vault_hcp_link_capabilities_link_control_link_control_proto_rawDesc = nil
file_vault_hcp_link_capabilities_link_control_link_control_proto_goTypes = nil
file_vault_hcp_link_capabilities_link_control_link_control_proto_depIdxs = nil
}

View File

@ -1,15 +0,0 @@
syntax = "proto3";
option go_package = "github.com/hashicorp/vault/vault/hcp_link/capabilities/link_control";
package link_control;
message PurgePolicyRequest {}
message PurgePolicyResponse {}
service HCPLinkControl {
// PurgePolicy Forgets the current Batch token, and its associated policy,
// such that the policy is forced to be refreshed.
rpc PurgePolicy(PurgePolicyRequest) returns (PurgePolicyResponse);
}

View File

@ -1,105 +0,0 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
package link_control
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// HCPLinkControlClient is the client API for HCPLinkControl 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 HCPLinkControlClient interface {
// PurgePolicy Forgets the current Batch token, and its associated policy,
// such that the policy is forced to be refreshed.
PurgePolicy(ctx context.Context, in *PurgePolicyRequest, opts ...grpc.CallOption) (*PurgePolicyResponse, error)
}
type hCPLinkControlClient struct {
cc grpc.ClientConnInterface
}
func NewHCPLinkControlClient(cc grpc.ClientConnInterface) HCPLinkControlClient {
return &hCPLinkControlClient{cc}
}
func (c *hCPLinkControlClient) PurgePolicy(ctx context.Context, in *PurgePolicyRequest, opts ...grpc.CallOption) (*PurgePolicyResponse, error) {
out := new(PurgePolicyResponse)
err := c.cc.Invoke(ctx, "/link_control.HCPLinkControl/PurgePolicy", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// HCPLinkControlServer is the server API for HCPLinkControl service.
// All implementations must embed UnimplementedHCPLinkControlServer
// for forward compatibility
type HCPLinkControlServer interface {
// PurgePolicy Forgets the current Batch token, and its associated policy,
// such that the policy is forced to be refreshed.
PurgePolicy(context.Context, *PurgePolicyRequest) (*PurgePolicyResponse, error)
mustEmbedUnimplementedHCPLinkControlServer()
}
// UnimplementedHCPLinkControlServer must be embedded to have forward compatible implementations.
type UnimplementedHCPLinkControlServer struct {
}
func (UnimplementedHCPLinkControlServer) PurgePolicy(context.Context, *PurgePolicyRequest) (*PurgePolicyResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method PurgePolicy not implemented")
}
func (UnimplementedHCPLinkControlServer) mustEmbedUnimplementedHCPLinkControlServer() {}
// UnsafeHCPLinkControlServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to HCPLinkControlServer will
// result in compilation errors.
type UnsafeHCPLinkControlServer interface {
mustEmbedUnimplementedHCPLinkControlServer()
}
func RegisterHCPLinkControlServer(s grpc.ServiceRegistrar, srv HCPLinkControlServer) {
s.RegisterService(&HCPLinkControl_ServiceDesc, srv)
}
func _HCPLinkControl_PurgePolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(PurgePolicyRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(HCPLinkControlServer).PurgePolicy(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/link_control.HCPLinkControl/PurgePolicy",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(HCPLinkControlServer).PurgePolicy(ctx, req.(*PurgePolicyRequest))
}
return interceptor(ctx, in, info, handler)
}
// HCPLinkControl_ServiceDesc is the grpc.ServiceDesc for HCPLinkControl service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var HCPLinkControl_ServiceDesc = grpc.ServiceDesc{
ServiceName: "link_control.HCPLinkControl",
HandlerType: (*HCPLinkControlServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "PurgePolicy",
Handler: _HCPLinkControl_PurgePolicy_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "vault/hcp_link/capabilities/link_control/link_control.proto",
}

View File

@ -14,13 +14,14 @@ import (
"github.com/hashicorp/vault/vault/cluster"
"github.com/hashicorp/vault/vault/hcp_link/capabilities"
"github.com/hashicorp/vault/vault/hcp_link/internal"
"github.com/hashicorp/vault/vault/hcp_link/proto/meta"
"google.golang.org/grpc"
"google.golang.org/grpc/keepalive"
"google.golang.org/grpc/reflection"
)
type hcpLinkMetaHandler struct {
UnimplementedHCPLinkMetaServer
meta.UnimplementedHCPLinkMetaServer
wrappedCore internal.WrappedCoreListNamespacesMounts
scadaProvider scada.SCADAProvider
@ -51,7 +52,7 @@ func NewHCPLinkMetaService(scadaProvider scada.SCADAProvider, c *vault.Core, bas
scadaProvider: scadaProvider,
}
RegisterHCPLinkMetaServer(grpcServer, handler)
meta.RegisterHCPLinkMetaServer(grpcServer, handler)
reflection.Register(grpcServer)
return handler
@ -112,7 +113,7 @@ func (h *hcpLinkMetaHandler) Stop() error {
return nil
}
func (h *hcpLinkMetaHandler) ListNamespaces(ctx context.Context, req *ListNamespacesRequest) (*ListNamespacesResponse, error) {
func (h *hcpLinkMetaHandler) ListNamespaces(ctx context.Context, req *meta.ListNamespacesRequest) (*meta.ListNamespacesResponse, error) {
children := h.wrappedCore.ListNamespaces(true)
var namespaces []string
@ -120,18 +121,18 @@ func (h *hcpLinkMetaHandler) ListNamespaces(ctx context.Context, req *ListNamesp
namespaces = append(namespaces, child.Path)
}
return &ListNamespacesResponse{
return &meta.ListNamespacesResponse{
Paths: namespaces,
}, nil
}
func (h *hcpLinkMetaHandler) ListMounts(ctx context.Context, req *ListMountsRequest) (*ListMountsResponse, error) {
func (h *hcpLinkMetaHandler) ListMounts(ctx context.Context, req *meta.ListMountsRequest) (*meta.ListMountsResponse, error) {
mountEntries, err := h.wrappedCore.ListMounts()
if err != nil {
return nil, err
}
var mounts []*Mount
var mounts []*meta.Mount
for _, entry := range mountEntries {
nsID := entry.NamespaceID
path := entry.Path
@ -145,25 +146,25 @@ func (h *hcpLinkMetaHandler) ListMounts(ctx context.Context, req *ListMountsRequ
path = ns.Path + path
}
mounts = append(mounts, &Mount{
mounts = append(mounts, &meta.Mount{
Path: path,
Type: entry.Type,
Description: entry.Description,
})
}
return &ListMountsResponse{
return &meta.ListMountsResponse{
Mounts: mounts,
}, nil
}
func (h *hcpLinkMetaHandler) ListAuths(ctx context.Context, req *ListAuthsRequest) (*ListAuthResponse, error) {
func (h *hcpLinkMetaHandler) ListAuths(ctx context.Context, req *meta.ListAuthsRequest) (*meta.ListAuthResponse, error) {
authEntries, err := h.wrappedCore.ListAuths()
if err != nil {
return nil, err
}
var auths []*Auth
var auths []*meta.Auth
for _, entry := range authEntries {
nsID := entry.NamespaceID
path := entry.Path
@ -177,14 +178,14 @@ func (h *hcpLinkMetaHandler) ListAuths(ctx context.Context, req *ListAuthsReques
path = ns.Path + path
}
auths = append(auths, &Auth{
auths = append(auths, &meta.Auth{
Path: path,
Type: entry.Type,
Description: entry.Description,
})
}
return &ListAuthResponse{
return &meta.ListAuthResponse{
Auths: auths,
}, nil
}

View File

@ -1,615 +0,0 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.1
// protoc v3.21.9
// source: vault/hcp_link/capabilities/meta/meta.proto
package meta
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type ListNamespacesRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *ListNamespacesRequest) Reset() {
*x = ListNamespacesRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_vault_hcp_link_capabilities_meta_meta_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListNamespacesRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListNamespacesRequest) ProtoMessage() {}
func (x *ListNamespacesRequest) ProtoReflect() protoreflect.Message {
mi := &file_vault_hcp_link_capabilities_meta_meta_proto_msgTypes[0]
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 ListNamespacesRequest.ProtoReflect.Descriptor instead.
func (*ListNamespacesRequest) Descriptor() ([]byte, []int) {
return file_vault_hcp_link_capabilities_meta_meta_proto_rawDescGZIP(), []int{0}
}
type ListNamespacesResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Paths []string `protobuf:"bytes,1,rep,name=Paths,proto3" json:"Paths,omitempty"`
}
func (x *ListNamespacesResponse) Reset() {
*x = ListNamespacesResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_vault_hcp_link_capabilities_meta_meta_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListNamespacesResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListNamespacesResponse) ProtoMessage() {}
func (x *ListNamespacesResponse) ProtoReflect() protoreflect.Message {
mi := &file_vault_hcp_link_capabilities_meta_meta_proto_msgTypes[1]
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 ListNamespacesResponse.ProtoReflect.Descriptor instead.
func (*ListNamespacesResponse) Descriptor() ([]byte, []int) {
return file_vault_hcp_link_capabilities_meta_meta_proto_rawDescGZIP(), []int{1}
}
func (x *ListNamespacesResponse) GetPaths() []string {
if x != nil {
return x.Paths
}
return nil
}
type ListMountsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *ListMountsRequest) Reset() {
*x = ListMountsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_vault_hcp_link_capabilities_meta_meta_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListMountsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListMountsRequest) ProtoMessage() {}
func (x *ListMountsRequest) ProtoReflect() protoreflect.Message {
mi := &file_vault_hcp_link_capabilities_meta_meta_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 ListMountsRequest.ProtoReflect.Descriptor instead.
func (*ListMountsRequest) Descriptor() ([]byte, []int) {
return file_vault_hcp_link_capabilities_meta_meta_proto_rawDescGZIP(), []int{2}
}
type Mount struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Path string `protobuf:"bytes,1,opt,name=Path,proto3" json:"Path,omitempty"`
Type string `protobuf:"bytes,2,opt,name=Type,proto3" json:"Type,omitempty"`
Description string `protobuf:"bytes,3,opt,name=Description,proto3" json:"Description,omitempty"`
}
func (x *Mount) Reset() {
*x = Mount{}
if protoimpl.UnsafeEnabled {
mi := &file_vault_hcp_link_capabilities_meta_meta_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Mount) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Mount) ProtoMessage() {}
func (x *Mount) ProtoReflect() protoreflect.Message {
mi := &file_vault_hcp_link_capabilities_meta_meta_proto_msgTypes[3]
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 Mount.ProtoReflect.Descriptor instead.
func (*Mount) Descriptor() ([]byte, []int) {
return file_vault_hcp_link_capabilities_meta_meta_proto_rawDescGZIP(), []int{3}
}
func (x *Mount) GetPath() string {
if x != nil {
return x.Path
}
return ""
}
func (x *Mount) GetType() string {
if x != nil {
return x.Type
}
return ""
}
func (x *Mount) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
type ListMountsResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Mounts []*Mount `protobuf:"bytes,1,rep,name=Mounts,proto3" json:"Mounts,omitempty"`
}
func (x *ListMountsResponse) Reset() {
*x = ListMountsResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_vault_hcp_link_capabilities_meta_meta_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListMountsResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListMountsResponse) ProtoMessage() {}
func (x *ListMountsResponse) ProtoReflect() protoreflect.Message {
mi := &file_vault_hcp_link_capabilities_meta_meta_proto_msgTypes[4]
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 ListMountsResponse.ProtoReflect.Descriptor instead.
func (*ListMountsResponse) Descriptor() ([]byte, []int) {
return file_vault_hcp_link_capabilities_meta_meta_proto_rawDescGZIP(), []int{4}
}
func (x *ListMountsResponse) GetMounts() []*Mount {
if x != nil {
return x.Mounts
}
return nil
}
type ListAuthsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *ListAuthsRequest) Reset() {
*x = ListAuthsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_vault_hcp_link_capabilities_meta_meta_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListAuthsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListAuthsRequest) ProtoMessage() {}
func (x *ListAuthsRequest) ProtoReflect() protoreflect.Message {
mi := &file_vault_hcp_link_capabilities_meta_meta_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 ListAuthsRequest.ProtoReflect.Descriptor instead.
func (*ListAuthsRequest) Descriptor() ([]byte, []int) {
return file_vault_hcp_link_capabilities_meta_meta_proto_rawDescGZIP(), []int{5}
}
type Auth struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Path string `protobuf:"bytes,1,opt,name=Path,proto3" json:"Path,omitempty"`
Type string `protobuf:"bytes,2,opt,name=Type,proto3" json:"Type,omitempty"`
Description string `protobuf:"bytes,3,opt,name=Description,proto3" json:"Description,omitempty"`
}
func (x *Auth) Reset() {
*x = Auth{}
if protoimpl.UnsafeEnabled {
mi := &file_vault_hcp_link_capabilities_meta_meta_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Auth) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Auth) ProtoMessage() {}
func (x *Auth) ProtoReflect() protoreflect.Message {
mi := &file_vault_hcp_link_capabilities_meta_meta_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 Auth.ProtoReflect.Descriptor instead.
func (*Auth) Descriptor() ([]byte, []int) {
return file_vault_hcp_link_capabilities_meta_meta_proto_rawDescGZIP(), []int{6}
}
func (x *Auth) GetPath() string {
if x != nil {
return x.Path
}
return ""
}
func (x *Auth) GetType() string {
if x != nil {
return x.Type
}
return ""
}
func (x *Auth) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
type ListAuthResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Auths []*Auth `protobuf:"bytes,1,rep,name=Auths,proto3" json:"Auths,omitempty"`
}
func (x *ListAuthResponse) Reset() {
*x = ListAuthResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_vault_hcp_link_capabilities_meta_meta_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListAuthResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListAuthResponse) ProtoMessage() {}
func (x *ListAuthResponse) ProtoReflect() protoreflect.Message {
mi := &file_vault_hcp_link_capabilities_meta_meta_proto_msgTypes[7]
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 ListAuthResponse.ProtoReflect.Descriptor instead.
func (*ListAuthResponse) Descriptor() ([]byte, []int) {
return file_vault_hcp_link_capabilities_meta_meta_proto_rawDescGZIP(), []int{7}
}
func (x *ListAuthResponse) GetAuths() []*Auth {
if x != nil {
return x.Auths
}
return nil
}
var File_vault_hcp_link_capabilities_meta_meta_proto protoreflect.FileDescriptor
var file_vault_hcp_link_capabilities_meta_meta_proto_rawDesc = []byte{
0x0a, 0x2b, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x68, 0x63, 0x70, 0x5f, 0x6c, 0x69, 0x6e, 0x6b,
0x2f, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x6d, 0x65,
0x74, 0x61, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x04, 0x6d,
0x65, 0x74, 0x61, 0x22, 0x17, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73,
0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x2e, 0x0a, 0x16,
0x4c, 0x69, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x50, 0x61, 0x74, 0x68, 0x73, 0x18,
0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x50, 0x61, 0x74, 0x68, 0x73, 0x22, 0x13, 0x0a, 0x11,
0x4c, 0x69, 0x73, 0x74, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x22, 0x51, 0x0a, 0x05, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x50, 0x61,
0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x50, 0x61, 0x74, 0x68, 0x12, 0x12,
0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x54, 0x79,
0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f,
0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70,
0x74, 0x69, 0x6f, 0x6e, 0x22, 0x39, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x6f, 0x75, 0x6e,
0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x06, 0x4d, 0x6f,
0x75, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x6d, 0x65, 0x74,
0x61, 0x2e, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x06, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x22,
0x12, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x75, 0x74, 0x68, 0x73, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x22, 0x50, 0x0a, 0x04, 0x41, 0x75, 0x74, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x50,
0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x50, 0x61, 0x74, 0x68, 0x12,
0x12, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x54,
0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69,
0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69,
0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x34, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x75, 0x74,
0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x20, 0x0a, 0x05, 0x41, 0x75, 0x74,
0x68, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e,
0x41, 0x75, 0x74, 0x68, 0x52, 0x05, 0x41, 0x75, 0x74, 0x68, 0x73, 0x32, 0xd8, 0x01, 0x0a, 0x0b,
0x48, 0x43, 0x50, 0x4c, 0x69, 0x6e, 0x6b, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x4b, 0x0a, 0x0e, 0x4c,
0x69, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, 0x1b, 0x2e,
0x6d, 0x65, 0x74, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61,
0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6d, 0x65, 0x74,
0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74,
0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x17, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x4c, 0x69,
0x73, 0x74, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x18, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x6f, 0x75, 0x6e, 0x74,
0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x09, 0x4c, 0x69, 0x73,
0x74, 0x41, 0x75, 0x74, 0x68, 0x73, 0x12, 0x16, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x4c, 0x69,
0x73, 0x74, 0x41, 0x75, 0x74, 0x68, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16,
0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x75, 0x74, 0x68, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x3d, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x76,
0x61, 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x68, 0x63, 0x70, 0x5f, 0x6c,
0x69, 0x6e, 0x6b, 0x2f, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73,
0x2f, 0x6d, 0x65, 0x74, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_vault_hcp_link_capabilities_meta_meta_proto_rawDescOnce sync.Once
file_vault_hcp_link_capabilities_meta_meta_proto_rawDescData = file_vault_hcp_link_capabilities_meta_meta_proto_rawDesc
)
func file_vault_hcp_link_capabilities_meta_meta_proto_rawDescGZIP() []byte {
file_vault_hcp_link_capabilities_meta_meta_proto_rawDescOnce.Do(func() {
file_vault_hcp_link_capabilities_meta_meta_proto_rawDescData = protoimpl.X.CompressGZIP(file_vault_hcp_link_capabilities_meta_meta_proto_rawDescData)
})
return file_vault_hcp_link_capabilities_meta_meta_proto_rawDescData
}
var file_vault_hcp_link_capabilities_meta_meta_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
var file_vault_hcp_link_capabilities_meta_meta_proto_goTypes = []interface{}{
(*ListNamespacesRequest)(nil), // 0: meta.ListNamespacesRequest
(*ListNamespacesResponse)(nil), // 1: meta.ListNamespacesResponse
(*ListMountsRequest)(nil), // 2: meta.ListMountsRequest
(*Mount)(nil), // 3: meta.Mount
(*ListMountsResponse)(nil), // 4: meta.ListMountsResponse
(*ListAuthsRequest)(nil), // 5: meta.ListAuthsRequest
(*Auth)(nil), // 6: meta.Auth
(*ListAuthResponse)(nil), // 7: meta.ListAuthResponse
}
var file_vault_hcp_link_capabilities_meta_meta_proto_depIdxs = []int32{
3, // 0: meta.ListMountsResponse.Mounts:type_name -> meta.Mount
6, // 1: meta.ListAuthResponse.Auths:type_name -> meta.Auth
0, // 2: meta.HCPLinkMeta.ListNamespaces:input_type -> meta.ListNamespacesRequest
2, // 3: meta.HCPLinkMeta.ListMounts:input_type -> meta.ListMountsRequest
5, // 4: meta.HCPLinkMeta.ListAuths:input_type -> meta.ListAuthsRequest
1, // 5: meta.HCPLinkMeta.ListNamespaces:output_type -> meta.ListNamespacesResponse
4, // 6: meta.HCPLinkMeta.ListMounts:output_type -> meta.ListMountsResponse
7, // 7: meta.HCPLinkMeta.ListAuths:output_type -> meta.ListAuthResponse
5, // [5:8] is the sub-list for method output_type
2, // [2:5] 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
}
func init() { file_vault_hcp_link_capabilities_meta_meta_proto_init() }
func file_vault_hcp_link_capabilities_meta_meta_proto_init() {
if File_vault_hcp_link_capabilities_meta_meta_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_vault_hcp_link_capabilities_meta_meta_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListNamespacesRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_vault_hcp_link_capabilities_meta_meta_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListNamespacesResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_vault_hcp_link_capabilities_meta_meta_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListMountsRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_vault_hcp_link_capabilities_meta_meta_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Mount); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_vault_hcp_link_capabilities_meta_meta_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListMountsResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_vault_hcp_link_capabilities_meta_meta_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListAuthsRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_vault_hcp_link_capabilities_meta_meta_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Auth); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_vault_hcp_link_capabilities_meta_meta_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListAuthResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_vault_hcp_link_capabilities_meta_meta_proto_rawDesc,
NumEnums: 0,
NumMessages: 8,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_vault_hcp_link_capabilities_meta_meta_proto_goTypes,
DependencyIndexes: file_vault_hcp_link_capabilities_meta_meta_proto_depIdxs,
MessageInfos: file_vault_hcp_link_capabilities_meta_meta_proto_msgTypes,
}.Build()
File_vault_hcp_link_capabilities_meta_meta_proto = out.File
file_vault_hcp_link_capabilities_meta_meta_proto_rawDesc = nil
file_vault_hcp_link_capabilities_meta_meta_proto_goTypes = nil
file_vault_hcp_link_capabilities_meta_meta_proto_depIdxs = nil
}

View File

@ -1,46 +0,0 @@
syntax = "proto3";
option go_package = "github.com/hashicorp/vault/vault/hcp_link/capabilities/meta";
package meta;
message ListNamespacesRequest {}
message ListNamespacesResponse {
repeated string Paths = 1;
}
message ListMountsRequest {}
message Mount {
string Path = 1;
string Type = 2;
string Description = 3;
}
message ListMountsResponse {
repeated Mount Mounts = 1;
}
message ListAuthsRequest {}
message Auth {
string Path = 1;
string Type = 2;
string Description = 3;
}
message ListAuthResponse {
repeated Auth Auths = 1;
}
service HCPLinkMeta {
// ListNamespaces will be used to recursively list all namespaces
rpc ListNamespaces(ListNamespacesRequest) returns (ListNamespacesResponse);
// ListMounts will be used to recursively list all mounts in all namespaces
rpc ListMounts(ListMountsRequest) returns (ListMountsResponse);
// ListAuths will be used to recursively list all auths in all namespaces
rpc ListAuths(ListAuthsRequest) returns (ListAuthResponse);
}

View File

@ -1,179 +0,0 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
package meta
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// HCPLinkMetaClient is the client API for HCPLinkMeta 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 HCPLinkMetaClient interface {
// ListNamespaces will be used to recursively list all namespaces
ListNamespaces(ctx context.Context, in *ListNamespacesRequest, opts ...grpc.CallOption) (*ListNamespacesResponse, error)
// ListMounts will be used to recursively list all mounts in all namespaces
ListMounts(ctx context.Context, in *ListMountsRequest, opts ...grpc.CallOption) (*ListMountsResponse, error)
// ListAuths will be used to recursively list all auths in all namespaces
ListAuths(ctx context.Context, in *ListAuthsRequest, opts ...grpc.CallOption) (*ListAuthResponse, error)
}
type hCPLinkMetaClient struct {
cc grpc.ClientConnInterface
}
func NewHCPLinkMetaClient(cc grpc.ClientConnInterface) HCPLinkMetaClient {
return &hCPLinkMetaClient{cc}
}
func (c *hCPLinkMetaClient) ListNamespaces(ctx context.Context, in *ListNamespacesRequest, opts ...grpc.CallOption) (*ListNamespacesResponse, error) {
out := new(ListNamespacesResponse)
err := c.cc.Invoke(ctx, "/meta.HCPLinkMeta/ListNamespaces", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *hCPLinkMetaClient) ListMounts(ctx context.Context, in *ListMountsRequest, opts ...grpc.CallOption) (*ListMountsResponse, error) {
out := new(ListMountsResponse)
err := c.cc.Invoke(ctx, "/meta.HCPLinkMeta/ListMounts", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *hCPLinkMetaClient) ListAuths(ctx context.Context, in *ListAuthsRequest, opts ...grpc.CallOption) (*ListAuthResponse, error) {
out := new(ListAuthResponse)
err := c.cc.Invoke(ctx, "/meta.HCPLinkMeta/ListAuths", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// HCPLinkMetaServer is the server API for HCPLinkMeta service.
// All implementations must embed UnimplementedHCPLinkMetaServer
// for forward compatibility
type HCPLinkMetaServer interface {
// ListNamespaces will be used to recursively list all namespaces
ListNamespaces(context.Context, *ListNamespacesRequest) (*ListNamespacesResponse, error)
// ListMounts will be used to recursively list all mounts in all namespaces
ListMounts(context.Context, *ListMountsRequest) (*ListMountsResponse, error)
// ListAuths will be used to recursively list all auths in all namespaces
ListAuths(context.Context, *ListAuthsRequest) (*ListAuthResponse, error)
mustEmbedUnimplementedHCPLinkMetaServer()
}
// UnimplementedHCPLinkMetaServer must be embedded to have forward compatible implementations.
type UnimplementedHCPLinkMetaServer struct {
}
func (UnimplementedHCPLinkMetaServer) ListNamespaces(context.Context, *ListNamespacesRequest) (*ListNamespacesResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListNamespaces not implemented")
}
func (UnimplementedHCPLinkMetaServer) ListMounts(context.Context, *ListMountsRequest) (*ListMountsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListMounts not implemented")
}
func (UnimplementedHCPLinkMetaServer) ListAuths(context.Context, *ListAuthsRequest) (*ListAuthResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListAuths not implemented")
}
func (UnimplementedHCPLinkMetaServer) mustEmbedUnimplementedHCPLinkMetaServer() {}
// UnsafeHCPLinkMetaServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to HCPLinkMetaServer will
// result in compilation errors.
type UnsafeHCPLinkMetaServer interface {
mustEmbedUnimplementedHCPLinkMetaServer()
}
func RegisterHCPLinkMetaServer(s grpc.ServiceRegistrar, srv HCPLinkMetaServer) {
s.RegisterService(&HCPLinkMeta_ServiceDesc, srv)
}
func _HCPLinkMeta_ListNamespaces_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListNamespacesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(HCPLinkMetaServer).ListNamespaces(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/meta.HCPLinkMeta/ListNamespaces",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(HCPLinkMetaServer).ListNamespaces(ctx, req.(*ListNamespacesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _HCPLinkMeta_ListMounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListMountsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(HCPLinkMetaServer).ListMounts(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/meta.HCPLinkMeta/ListMounts",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(HCPLinkMetaServer).ListMounts(ctx, req.(*ListMountsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _HCPLinkMeta_ListAuths_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListAuthsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(HCPLinkMetaServer).ListAuths(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/meta.HCPLinkMeta/ListAuths",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(HCPLinkMetaServer).ListAuths(ctx, req.(*ListAuthsRequest))
}
return interceptor(ctx, in, info, handler)
}
// HCPLinkMeta_ServiceDesc is the grpc.ServiceDesc for HCPLinkMeta service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var HCPLinkMeta_ServiceDesc = grpc.ServiceDesc{
ServiceName: "meta.HCPLinkMeta",
HandlerType: (*HCPLinkMetaServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "ListNamespaces",
Handler: _HCPLinkMeta_ListNamespaces_Handler,
},
{
MethodName: "ListMounts",
Handler: _HCPLinkMeta_ListMounts_Handler,
},
{
MethodName: "ListAuths",
Handler: _HCPLinkMeta_ListAuths_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "vault/hcp_link/capabilities/meta/meta.proto",
}