userapi

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2024 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UserAPI_SetManifest_FullMethodName  = "/userapi.UserAPI/SetManifest"
	UserAPI_GetManifests_FullMethodName = "/userapi.UserAPI/GetManifests"
	UserAPI_Recover_FullMethodName      = "/userapi.UserAPI/Recover"
)
View Source
const Port = "1313"

Port is the port of the coordinator API.

Variables

View Source
var File_userapi_proto protoreflect.FileDescriptor
View Source
var UserAPI_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "userapi.UserAPI",
	HandlerType: (*UserAPIServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SetManifest",
			Handler:    _UserAPI_SetManifest_Handler,
		},
		{
			MethodName: "GetManifests",
			Handler:    _UserAPI_GetManifests_Handler,
		},
		{
			MethodName: "Recover",
			Handler:    _UserAPI_Recover_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "userapi.proto",
}

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

Functions

func RegisterUserAPIServer

func RegisterUserAPIServer(s grpc.ServiceRegistrar, srv UserAPIServer)

Types

type GetManifestsRequest

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

func (*GetManifestsRequest) Descriptor deprecated

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

Deprecated: Use GetManifestsRequest.ProtoReflect.Descriptor instead.

func (*GetManifestsRequest) ProtoMessage

func (*GetManifestsRequest) ProtoMessage()

func (*GetManifestsRequest) ProtoReflect

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

func (*GetManifestsRequest) Reset

func (x *GetManifestsRequest) Reset()

func (*GetManifestsRequest) String

func (x *GetManifestsRequest) String() string

type GetManifestsResponse

type GetManifestsResponse struct {
	Manifests [][]byte `protobuf:"bytes,1,rep,name=Manifests,proto3" json:"Manifests,omitempty"`
	Policies  [][]byte `protobuf:"bytes,2,rep,name=Policies,proto3" json:"Policies,omitempty"`
	// PEM-encoded certificate
	RootCA []byte `protobuf:"bytes,3,opt,name=RootCA,proto3" json:"RootCA,omitempty"`
	// PEM-encoded certificate
	MeshCA []byte `protobuf:"bytes,4,opt,name=MeshCA,proto3" json:"MeshCA,omitempty"`
	// contains filtered or unexported fields
}

func (*GetManifestsResponse) Descriptor deprecated

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

Deprecated: Use GetManifestsResponse.ProtoReflect.Descriptor instead.

func (*GetManifestsResponse) GetManifests

func (x *GetManifestsResponse) GetManifests() [][]byte

func (*GetManifestsResponse) GetMeshCA

func (x *GetManifestsResponse) GetMeshCA() []byte

func (*GetManifestsResponse) GetPolicies

func (x *GetManifestsResponse) GetPolicies() [][]byte

func (*GetManifestsResponse) GetRootCA

func (x *GetManifestsResponse) GetRootCA() []byte

func (*GetManifestsResponse) ProtoMessage

func (*GetManifestsResponse) ProtoMessage()

func (*GetManifestsResponse) ProtoReflect

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

func (*GetManifestsResponse) Reset

func (x *GetManifestsResponse) Reset()

func (*GetManifestsResponse) String

func (x *GetManifestsResponse) String() string

type RecoverRequest added in v0.8.0

type RecoverRequest struct {
	Seed []byte `protobuf:"bytes,1,opt,name=Seed,proto3" json:"Seed,omitempty"`
	Salt []byte `protobuf:"bytes,2,opt,name=Salt,proto3" json:"Salt,omitempty"`
	// contains filtered or unexported fields
}

func (*RecoverRequest) Descriptor deprecated added in v0.8.0

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

Deprecated: Use RecoverRequest.ProtoReflect.Descriptor instead.

func (*RecoverRequest) GetSalt added in v0.8.0

func (x *RecoverRequest) GetSalt() []byte

func (*RecoverRequest) GetSeed added in v0.8.0

func (x *RecoverRequest) GetSeed() []byte

func (*RecoverRequest) ProtoMessage added in v0.8.0

func (*RecoverRequest) ProtoMessage()

func (*RecoverRequest) ProtoReflect added in v0.8.0

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

func (*RecoverRequest) Reset added in v0.8.0

func (x *RecoverRequest) Reset()

func (*RecoverRequest) String added in v0.8.0

func (x *RecoverRequest) String() string

type RecoverResponse added in v0.8.0

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

func (*RecoverResponse) Descriptor deprecated added in v0.8.0

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

Deprecated: Use RecoverResponse.ProtoReflect.Descriptor instead.

func (*RecoverResponse) ProtoMessage added in v0.8.0

func (*RecoverResponse) ProtoMessage()

func (*RecoverResponse) ProtoReflect added in v0.8.0

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

func (*RecoverResponse) Reset added in v0.8.0

func (x *RecoverResponse) Reset()

func (*RecoverResponse) String added in v0.8.0

func (x *RecoverResponse) String() string

type SeedShare added in v0.7.0

type SeedShare struct {
	PublicKey     string `protobuf:"bytes,1,opt,name=PublicKey,proto3" json:"PublicKey,omitempty"`
	EncryptedSeed []byte `protobuf:"bytes,2,opt,name=EncryptedSeed,proto3" json:"EncryptedSeed,omitempty"`
	// contains filtered or unexported fields
}

func (*SeedShare) Descriptor deprecated added in v0.7.0

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

Deprecated: Use SeedShare.ProtoReflect.Descriptor instead.

func (*SeedShare) GetEncryptedSeed added in v0.7.0

func (x *SeedShare) GetEncryptedSeed() []byte

func (*SeedShare) GetPublicKey added in v0.7.0

func (x *SeedShare) GetPublicKey() string

func (*SeedShare) ProtoMessage added in v0.7.0

func (*SeedShare) ProtoMessage()

func (*SeedShare) ProtoReflect added in v0.7.0

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

func (*SeedShare) Reset added in v0.7.0

func (x *SeedShare) Reset()

func (*SeedShare) String added in v0.7.0

func (x *SeedShare) String() string

type SeedShareDocument added in v0.7.0

type SeedShareDocument struct {
	SeedShares []*SeedShare `protobuf:"bytes,1,rep,name=SeedShares,proto3" json:"SeedShares,omitempty"`
	Salt       []byte       `protobuf:"bytes,2,opt,name=salt,proto3" json:"salt,omitempty"`
	// contains filtered or unexported fields
}

func (*SeedShareDocument) Descriptor deprecated added in v0.7.0

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

Deprecated: Use SeedShareDocument.ProtoReflect.Descriptor instead.

func (*SeedShareDocument) GetSalt added in v0.7.0

func (x *SeedShareDocument) GetSalt() []byte

func (*SeedShareDocument) GetSeedShares added in v0.7.0

func (x *SeedShareDocument) GetSeedShares() []*SeedShare

func (*SeedShareDocument) ProtoMessage added in v0.7.0

func (*SeedShareDocument) ProtoMessage()

func (*SeedShareDocument) ProtoReflect added in v0.7.0

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

func (*SeedShareDocument) Reset added in v0.7.0

func (x *SeedShareDocument) Reset()

func (*SeedShareDocument) String added in v0.7.0

func (x *SeedShareDocument) String() string

type SetManifestRequest

type SetManifestRequest struct {
	Manifest []byte   `protobuf:"bytes,1,opt,name=Manifest,proto3" json:"Manifest,omitempty"`
	Policies [][]byte `protobuf:"bytes,2,rep,name=Policies,proto3" json:"Policies,omitempty"`
	// contains filtered or unexported fields
}

func (*SetManifestRequest) Descriptor deprecated

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

Deprecated: Use SetManifestRequest.ProtoReflect.Descriptor instead.

func (*SetManifestRequest) GetManifest

func (x *SetManifestRequest) GetManifest() []byte

func (*SetManifestRequest) GetPolicies

func (x *SetManifestRequest) GetPolicies() [][]byte

func (*SetManifestRequest) ProtoMessage

func (*SetManifestRequest) ProtoMessage()

func (*SetManifestRequest) ProtoReflect

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

func (*SetManifestRequest) Reset

func (x *SetManifestRequest) Reset()

func (*SetManifestRequest) String

func (x *SetManifestRequest) String() string

type SetManifestResponse

type SetManifestResponse struct {

	// PEM-encoded certificate
	RootCA []byte `protobuf:"bytes,1,opt,name=RootCA,proto3" json:"RootCA,omitempty"`
	// PEM-encoded certificate
	MeshCA []byte `protobuf:"bytes,2,opt,name=MeshCA,proto3" json:"MeshCA,omitempty"`
	// Secret seed (share), encrypted with each of the recovery holders' public keys.
	SeedSharesDoc *SeedShareDocument `protobuf:"bytes,3,opt,name=SeedSharesDoc,proto3" json:"SeedSharesDoc,omitempty"`
	// contains filtered or unexported fields
}

func (*SetManifestResponse) Descriptor deprecated

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

Deprecated: Use SetManifestResponse.ProtoReflect.Descriptor instead.

func (*SetManifestResponse) GetMeshCA

func (x *SetManifestResponse) GetMeshCA() []byte

func (*SetManifestResponse) GetRootCA

func (x *SetManifestResponse) GetRootCA() []byte

func (*SetManifestResponse) GetSeedSharesDoc added in v0.7.0

func (x *SetManifestResponse) GetSeedSharesDoc() *SeedShareDocument

func (*SetManifestResponse) ProtoMessage

func (*SetManifestResponse) ProtoMessage()

func (*SetManifestResponse) ProtoReflect

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

func (*SetManifestResponse) Reset

func (x *SetManifestResponse) Reset()

func (*SetManifestResponse) String

func (x *SetManifestResponse) String() string

type UnimplementedUserAPIServer

type UnimplementedUserAPIServer struct {
}

UnimplementedUserAPIServer must be embedded to have forward compatible implementations.

func (UnimplementedUserAPIServer) GetManifests

func (UnimplementedUserAPIServer) Recover added in v0.8.0

func (UnimplementedUserAPIServer) SetManifest

type UnsafeUserAPIServer

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

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

type UserAPIClient

type UserAPIClient interface {
	SetManifest(ctx context.Context, in *SetManifestRequest, opts ...grpc.CallOption) (*SetManifestResponse, error)
	GetManifests(ctx context.Context, in *GetManifestsRequest, opts ...grpc.CallOption) (*GetManifestsResponse, error)
	Recover(ctx context.Context, in *RecoverRequest, opts ...grpc.CallOption) (*RecoverResponse, error)
}

UserAPIClient is the client API for UserAPI 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 NewUserAPIClient

func NewUserAPIClient(cc grpc.ClientConnInterface) UserAPIClient

type UserAPIServer

type UserAPIServer interface {
	SetManifest(context.Context, *SetManifestRequest) (*SetManifestResponse, error)
	GetManifests(context.Context, *GetManifestsRequest) (*GetManifestsResponse, error)
	Recover(context.Context, *RecoverRequest) (*RecoverResponse, error)
	// contains filtered or unexported methods
}

UserAPIServer is the server API for UserAPI service. All implementations must embed UnimplementedUserAPIServer for forward compatibility

Jump to

Keyboard shortcuts

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