grpcapi

package
v0.7.7 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CA_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "edgeca.CA",
	HandlerType: (*CAServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "RequestPolicy",
			Handler:    _CA_RequestPolicy_Handler,
		},
		{
			MethodName: "GenerateCertificate",
			Handler:    _CA_GenerateCertificate_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "edgeca.proto",
}

CA_ServiceDesc is the grpc.ServiceDesc for CA service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var EdgeAuth_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "edgeauth.EdgeAuth",
	HandlerType: (*EdgeAuthServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateToken",
			Handler:    _EdgeAuth_CreateToken_Handler,
		},
		{
			MethodName: "ValidateToken",
			Handler:    _EdgeAuth_ValidateToken_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "edgeauth.proto",
}

EdgeAuth_ServiceDesc is the grpc.ServiceDesc for EdgeAuth service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_edgeauth_proto protoreflect.FileDescriptor
View Source
var File_edgeca_proto protoreflect.FileDescriptor

Functions

func RegisterCAServer

func RegisterCAServer(s grpc.ServiceRegistrar, srv CAServer)

func RegisterEdgeAuthServer added in v0.7.6

func RegisterEdgeAuthServer(s grpc.ServiceRegistrar, srv EdgeAuthServer)

func StartGrpcServer

func StartGrpcServer(port int, useSDS bool)

StartGrpcServer starts up the gRPC server

Types

type CAClient

type CAClient interface {
	RequestPolicy(ctx context.Context, in *PolicyRequest, opts ...grpc.CallOption) (*PolicyReply, error)
	GenerateCertificate(ctx context.Context, in *CertificateRequest, opts ...grpc.CallOption) (*CertificateReply, error)
}

CAClient is the client API for CA service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewCAClient

func NewCAClient(cc grpc.ClientConnInterface) CAClient

type CAServer

type CAServer interface {
	RequestPolicy(context.Context, *PolicyRequest) (*PolicyReply, error)
	GenerateCertificate(context.Context, *CertificateRequest) (*CertificateReply, error)
	// contains filtered or unexported methods
}

CAServer is the server API for CA service. All implementations must embed UnimplementedCAServer for forward compatibility

type CertificateReply

type CertificateReply struct {
	Certificate string `protobuf:"bytes,1,opt,name=certificate,proto3" json:"certificate,omitempty"`
	PrivateKey  string `protobuf:"bytes,2,opt,name=privateKey,proto3" json:"privateKey,omitempty"`
	// contains filtered or unexported fields
}

func (*CertificateReply) Descriptor deprecated

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

Deprecated: Use CertificateReply.ProtoReflect.Descriptor instead.

func (*CertificateReply) GetCertificate

func (x *CertificateReply) GetCertificate() string

func (*CertificateReply) GetPrivateKey

func (x *CertificateReply) GetPrivateKey() string

func (*CertificateReply) ProtoMessage

func (*CertificateReply) ProtoMessage()

func (*CertificateReply) ProtoReflect

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

func (*CertificateReply) Reset

func (x *CertificateReply) Reset()

func (*CertificateReply) String

func (x *CertificateReply) String() string

type CertificateRequest

type CertificateRequest struct {
	Csr       string `protobuf:"bytes,1,opt,name=csr,proto3" json:"csr,omitempty"`
	AuthToken string `protobuf:"bytes,2,opt,name=authToken,proto3" json:"authToken,omitempty"`
	// contains filtered or unexported fields
}

func (*CertificateRequest) Descriptor deprecated

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

Deprecated: Use CertificateRequest.ProtoReflect.Descriptor instead.

func (*CertificateRequest) GetAuthToken

func (x *CertificateRequest) GetAuthToken() string

func (*CertificateRequest) GetCsr

func (x *CertificateRequest) GetCsr() string

func (*CertificateRequest) ProtoMessage

func (*CertificateRequest) ProtoMessage()

func (*CertificateRequest) ProtoReflect

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

func (*CertificateRequest) Reset

func (x *CertificateRequest) Reset()

func (*CertificateRequest) String

func (x *CertificateRequest) String() string

type CreateTokenReply added in v0.7.6

type CreateTokenReply struct {
	Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateTokenReply) Descriptor deprecated added in v0.7.6

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

Deprecated: Use CreateTokenReply.ProtoReflect.Descriptor instead.

func (*CreateTokenReply) GetToken added in v0.7.6

func (x *CreateTokenReply) GetToken() string

func (*CreateTokenReply) ProtoMessage added in v0.7.6

func (*CreateTokenReply) ProtoMessage()

func (*CreateTokenReply) ProtoReflect added in v0.7.6

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

func (*CreateTokenReply) Reset added in v0.7.6

func (x *CreateTokenReply) Reset()

func (*CreateTokenReply) String added in v0.7.6

func (x *CreateTokenReply) String() string

type CreateTokenRequest added in v0.7.6

type CreateTokenRequest struct {
	User        string `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
	Password    string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	Application string `protobuf:"bytes,3,opt,name=application,proto3" json:"application,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateTokenRequest) Descriptor deprecated added in v0.7.6

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

Deprecated: Use CreateTokenRequest.ProtoReflect.Descriptor instead.

func (*CreateTokenRequest) GetApplication added in v0.7.6

func (x *CreateTokenRequest) GetApplication() string

func (*CreateTokenRequest) GetPassword added in v0.7.6

func (x *CreateTokenRequest) GetPassword() string

func (*CreateTokenRequest) GetUser added in v0.7.6

func (x *CreateTokenRequest) GetUser() string

func (*CreateTokenRequest) ProtoMessage added in v0.7.6

func (*CreateTokenRequest) ProtoMessage()

func (*CreateTokenRequest) ProtoReflect added in v0.7.6

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

func (*CreateTokenRequest) Reset added in v0.7.6

func (x *CreateTokenRequest) Reset()

func (*CreateTokenRequest) String added in v0.7.6

func (x *CreateTokenRequest) String() string

type EdgeAuthClient added in v0.7.6

type EdgeAuthClient interface {
	CreateToken(ctx context.Context, in *CreateTokenRequest, opts ...grpc.CallOption) (*CreateTokenReply, error)
	ValidateToken(ctx context.Context, in *ValidateTokenRequest, opts ...grpc.CallOption) (*ValidateTokenReply, error)
}

EdgeAuthClient is the client API for EdgeAuth service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewEdgeAuthClient added in v0.7.6

func NewEdgeAuthClient(cc grpc.ClientConnInterface) EdgeAuthClient

type EdgeAuthServer added in v0.7.6

type EdgeAuthServer interface {
	CreateToken(context.Context, *CreateTokenRequest) (*CreateTokenReply, error)
	ValidateToken(context.Context, *ValidateTokenRequest) (*ValidateTokenReply, error)
	// contains filtered or unexported methods
}

EdgeAuthServer is the server API for EdgeAuth service. All implementations must embed UnimplementedEdgeAuthServer for forward compatibility

type PolicyReply

type PolicyReply struct {
	Policy                    string `protobuf:"bytes,1,opt,name=policy,proto3" json:"policy,omitempty"`
	DefaultOrganization       string `protobuf:"bytes,2,opt,name=defaultOrganization,proto3" json:"defaultOrganization,omitempty"`
	DefaultOrganizationalUnit string `protobuf:"bytes,3,opt,name=defaultOrganizationalUnit,proto3" json:"defaultOrganizationalUnit,omitempty"`
	DefaultProvince           string `protobuf:"bytes,4,opt,name=defaultProvince,proto3" json:"defaultProvince,omitempty"`
	DefaultLocality           string `protobuf:"bytes,5,opt,name=defaultLocality,proto3" json:"defaultLocality,omitempty"`
	DefaultCountry            string `protobuf:"bytes,6,opt,name=defaultCountry,proto3" json:"defaultCountry,omitempty"`
	// contains filtered or unexported fields
}

func (*PolicyReply) Descriptor deprecated

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

Deprecated: Use PolicyReply.ProtoReflect.Descriptor instead.

func (*PolicyReply) GetDefaultCountry

func (x *PolicyReply) GetDefaultCountry() string

func (*PolicyReply) GetDefaultLocality

func (x *PolicyReply) GetDefaultLocality() string

func (*PolicyReply) GetDefaultOrganization

func (x *PolicyReply) GetDefaultOrganization() string

func (*PolicyReply) GetDefaultOrganizationalUnit

func (x *PolicyReply) GetDefaultOrganizationalUnit() string

func (*PolicyReply) GetDefaultProvince

func (x *PolicyReply) GetDefaultProvince() string

func (*PolicyReply) GetPolicy

func (x *PolicyReply) GetPolicy() string

func (*PolicyReply) ProtoMessage

func (*PolicyReply) ProtoMessage()

func (*PolicyReply) ProtoReflect

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

func (*PolicyReply) Reset

func (x *PolicyReply) Reset()

func (*PolicyReply) String

func (x *PolicyReply) String() string

type PolicyRequest

type PolicyRequest struct {
	// contains filtered or unexported fields
}

func (*PolicyRequest) Descriptor deprecated

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

Deprecated: Use PolicyRequest.ProtoReflect.Descriptor instead.

func (*PolicyRequest) ProtoMessage

func (*PolicyRequest) ProtoMessage()

func (*PolicyRequest) ProtoReflect

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

func (*PolicyRequest) Reset

func (x *PolicyRequest) Reset()

func (*PolicyRequest) String

func (x *PolicyRequest) String() string

type UnimplementedCAServer

type UnimplementedCAServer struct {
}

UnimplementedCAServer must be embedded to have forward compatible implementations.

func (UnimplementedCAServer) GenerateCertificate

func (UnimplementedCAServer) RequestPolicy

type UnimplementedEdgeAuthServer added in v0.7.6

type UnimplementedEdgeAuthServer struct {
}

UnimplementedEdgeAuthServer must be embedded to have forward compatible implementations.

func (UnimplementedEdgeAuthServer) CreateToken added in v0.7.6

func (UnimplementedEdgeAuthServer) ValidateToken added in v0.7.6

type UnsafeCAServer

type UnsafeCAServer interface {
	// contains filtered or unexported methods
}

UnsafeCAServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CAServer will result in compilation errors.

type UnsafeEdgeAuthServer added in v0.7.6

type UnsafeEdgeAuthServer interface {
	// contains filtered or unexported methods
}

UnsafeEdgeAuthServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to EdgeAuthServer will result in compilation errors.

type ValidateTokenReply added in v0.7.6

type ValidateTokenReply struct {
	Ok     bool   `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"`
	Policy string `protobuf:"bytes,2,opt,name=policy,proto3" json:"policy,omitempty"`
	// contains filtered or unexported fields
}

func (*ValidateTokenReply) Descriptor deprecated added in v0.7.6

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

Deprecated: Use ValidateTokenReply.ProtoReflect.Descriptor instead.

func (*ValidateTokenReply) GetOk added in v0.7.6

func (x *ValidateTokenReply) GetOk() bool

func (*ValidateTokenReply) GetPolicy added in v0.7.6

func (x *ValidateTokenReply) GetPolicy() string

func (*ValidateTokenReply) ProtoMessage added in v0.7.6

func (*ValidateTokenReply) ProtoMessage()

func (*ValidateTokenReply) ProtoReflect added in v0.7.6

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

func (*ValidateTokenReply) Reset added in v0.7.6

func (x *ValidateTokenReply) Reset()

func (*ValidateTokenReply) String added in v0.7.6

func (x *ValidateTokenReply) String() string

type ValidateTokenRequest added in v0.7.6

type ValidateTokenRequest struct {
	Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	// contains filtered or unexported fields
}

func (*ValidateTokenRequest) Descriptor deprecated added in v0.7.6

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

Deprecated: Use ValidateTokenRequest.ProtoReflect.Descriptor instead.

func (*ValidateTokenRequest) GetToken added in v0.7.6

func (x *ValidateTokenRequest) GetToken() string

func (*ValidateTokenRequest) ProtoMessage added in v0.7.6

func (*ValidateTokenRequest) ProtoMessage()

func (*ValidateTokenRequest) ProtoReflect added in v0.7.6

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

func (*ValidateTokenRequest) Reset added in v0.7.6

func (x *ValidateTokenRequest) Reset()

func (*ValidateTokenRequest) String added in v0.7.6

func (x *ValidateTokenRequest) String() string

Jump to

Keyboard shortcuts

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