chain

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ConsensusType_name = map[int32]string{
		0: "UnknownConsensusType",
		1: "BFT",
		2: "Raft",
	}
	ConsensusType_value = map[string]int32{
		"UnknownConsensusType": 0,
		"BFT":                  1,
		"Raft":                 2,
	}
)

Enum value maps for ConsensusType.

View Source
var (
	Status_name = map[int32]string{
		0: "UnknownStatus",
		1: "Online",
		2: "Publicizing",
	}
	Status_value = map[string]int32{
		"UnknownStatus": 0,
		"Online":        1,
		"Publicizing":   2,
	}
)

Enum value maps for Status.

View Source
var File_api_chain_chain_proto protoreflect.FileDescriptor

Functions

func RegisterChainServiceServer

func RegisterChainServiceServer(s *grpc.Server, srv ChainServiceServer)

Types

type Chain

type Chain struct {
	Name            string        `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Namespace       string        `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"`
	Id              string        `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"`
	Timestamp       int64         `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	PrevHash        string        `protobuf:"bytes,5,opt,name=prevHash,proto3" json:"prevHash,omitempty"`
	BlockInterval   int32         `protobuf:"varint,6,opt,name=blockInterval,proto3" json:"blockInterval,omitempty"`
	BlockLimit      int32         `protobuf:"varint,7,opt,name=blockLimit,proto3" json:"blockLimit,omitempty"`
	EnableTls       bool          `protobuf:"varint,8,opt,name=enableTls,proto3" json:"enableTls,omitempty"`
	ConsensusType   ConsensusType `protobuf:"varint,9,opt,name=consensusType,proto3,enum=chain.ConsensusType" json:"consensusType,omitempty"`
	NetworkImage    string        `protobuf:"bytes,10,opt,name=networkImage,proto3" json:"networkImage,omitempty"`
	ConsensusImage  string        `protobuf:"bytes,11,opt,name=consensusImage,proto3" json:"consensusImage,omitempty"`
	ExecutorImage   string        `protobuf:"bytes,12,opt,name=executorImage,proto3" json:"executorImage,omitempty"`
	StorageImage    string        `protobuf:"bytes,13,opt,name=storageImage,proto3" json:"storageImage,omitempty"`
	ControllerImage string        `protobuf:"bytes,14,opt,name=controllerImage,proto3" json:"controllerImage,omitempty"`
	KmsImage        string        `protobuf:"bytes,15,opt,name=kmsImage,proto3" json:"kmsImage,omitempty"`
	Version         string        `protobuf:"bytes,16,opt,name=version,proto3" json:"version,omitempty"`
	PullPolicy      string        `protobuf:"bytes,17,opt,name=pullPolicy,proto3" json:"pullPolicy,omitempty"`
	// contains filtered or unexported fields
}

func (*Chain) Descriptor deprecated

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

Deprecated: Use Chain.ProtoReflect.Descriptor instead.

func (*Chain) GetBlockInterval

func (x *Chain) GetBlockInterval() int32

func (*Chain) GetBlockLimit

func (x *Chain) GetBlockLimit() int32

func (*Chain) GetConsensusImage

func (x *Chain) GetConsensusImage() string

func (*Chain) GetConsensusType

func (x *Chain) GetConsensusType() ConsensusType

func (*Chain) GetControllerImage

func (x *Chain) GetControllerImage() string

func (*Chain) GetEnableTls

func (x *Chain) GetEnableTls() bool

func (*Chain) GetExecutorImage

func (x *Chain) GetExecutorImage() string

func (*Chain) GetId

func (x *Chain) GetId() string

func (*Chain) GetKmsImage

func (x *Chain) GetKmsImage() string

func (*Chain) GetName

func (x *Chain) GetName() string

func (*Chain) GetNamespace

func (x *Chain) GetNamespace() string

func (*Chain) GetNetworkImage

func (x *Chain) GetNetworkImage() string

func (*Chain) GetPrevHash

func (x *Chain) GetPrevHash() string

func (*Chain) GetPullPolicy

func (x *Chain) GetPullPolicy() string

func (*Chain) GetStorageImage

func (x *Chain) GetStorageImage() string

func (*Chain) GetTimestamp

func (x *Chain) GetTimestamp() int64

func (*Chain) GetVersion

func (x *Chain) GetVersion() string

func (*Chain) ProtoMessage

func (*Chain) ProtoMessage()

func (*Chain) ProtoReflect

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

func (*Chain) Reset

func (x *Chain) Reset()

func (*Chain) String

func (x *Chain) String() string

type ChainDeleteRequest

type ChainDeleteRequest struct {
	Name      string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"`
	// contains filtered or unexported fields
}

func (*ChainDeleteRequest) Descriptor deprecated

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

Deprecated: Use ChainDeleteRequest.ProtoReflect.Descriptor instead.

func (*ChainDeleteRequest) GetName

func (x *ChainDeleteRequest) GetName() string

func (*ChainDeleteRequest) GetNamespace

func (x *ChainDeleteRequest) GetNamespace() string

func (*ChainDeleteRequest) ProtoMessage

func (*ChainDeleteRequest) ProtoMessage()

func (*ChainDeleteRequest) ProtoReflect

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

func (*ChainDeleteRequest) Reset

func (x *ChainDeleteRequest) Reset()

func (*ChainDeleteRequest) String

func (x *ChainDeleteRequest) String() string

type ChainDescribeRequest

type ChainDescribeRequest struct {
	Name      string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"`
	// contains filtered or unexported fields
}

func (*ChainDescribeRequest) Descriptor deprecated

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

Deprecated: Use ChainDescribeRequest.ProtoReflect.Descriptor instead.

func (*ChainDescribeRequest) GetName

func (x *ChainDescribeRequest) GetName() string

func (*ChainDescribeRequest) GetNamespace

func (x *ChainDescribeRequest) GetNamespace() string

func (*ChainDescribeRequest) ProtoMessage

func (*ChainDescribeRequest) ProtoMessage()

func (*ChainDescribeRequest) ProtoReflect

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

func (*ChainDescribeRequest) Reset

func (x *ChainDescribeRequest) Reset()

func (*ChainDescribeRequest) String

func (x *ChainDescribeRequest) String() string

type ChainDescribeResponse

type ChainDescribeResponse struct {
	Name            string           `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Namespace       string           `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"`
	Id              string           `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"`
	Timestamp       int64            `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	PrevHash        string           `protobuf:"bytes,5,opt,name=prevHash,proto3" json:"prevHash,omitempty"`
	BlockInterval   int32            `protobuf:"varint,6,opt,name=blockInterval,proto3" json:"blockInterval,omitempty"`
	BlockLimit      int32            `protobuf:"varint,7,opt,name=blockLimit,proto3" json:"blockLimit,omitempty"`
	EnableTls       bool             `protobuf:"varint,8,opt,name=enableTls,proto3" json:"enableTls,omitempty"`
	ConsensusType   ConsensusType    `protobuf:"varint,9,opt,name=consensusType,proto3,enum=chain.ConsensusType" json:"consensusType,omitempty"`
	NetworkImage    string           `protobuf:"bytes,10,opt,name=networkImage,proto3" json:"networkImage,omitempty"`
	ConsensusImage  string           `protobuf:"bytes,11,opt,name=consensusImage,proto3" json:"consensusImage,omitempty"`
	ExecutorImage   string           `protobuf:"bytes,12,opt,name=executorImage,proto3" json:"executorImage,omitempty"`
	StorageImage    string           `protobuf:"bytes,13,opt,name=storageImage,proto3" json:"storageImage,omitempty"`
	ControllerImage string           `protobuf:"bytes,14,opt,name=controllerImage,proto3" json:"controllerImage,omitempty"`
	KmsImage        string           `protobuf:"bytes,15,opt,name=kmsImage,proto3" json:"kmsImage,omitempty"`
	Nodes           []*node.Node     `protobuf:"bytes,16,rep,name=nodes,proto3" json:"nodes,omitempty"`
	AdminAccount    *account.Account `protobuf:"bytes,17,opt,name=adminAccount,proto3" json:"adminAccount,omitempty"`
	Status          Status           `protobuf:"varint,18,opt,name=status,proto3,enum=chain.Status" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*ChainDescribeResponse) Descriptor deprecated

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

Deprecated: Use ChainDescribeResponse.ProtoReflect.Descriptor instead.

func (*ChainDescribeResponse) GetAdminAccount

func (x *ChainDescribeResponse) GetAdminAccount() *account.Account

func (*ChainDescribeResponse) GetBlockInterval

func (x *ChainDescribeResponse) GetBlockInterval() int32

func (*ChainDescribeResponse) GetBlockLimit

func (x *ChainDescribeResponse) GetBlockLimit() int32

func (*ChainDescribeResponse) GetConsensusImage

func (x *ChainDescribeResponse) GetConsensusImage() string

func (*ChainDescribeResponse) GetConsensusType

func (x *ChainDescribeResponse) GetConsensusType() ConsensusType

func (*ChainDescribeResponse) GetControllerImage

func (x *ChainDescribeResponse) GetControllerImage() string

func (*ChainDescribeResponse) GetEnableTls

func (x *ChainDescribeResponse) GetEnableTls() bool

func (*ChainDescribeResponse) GetExecutorImage

func (x *ChainDescribeResponse) GetExecutorImage() string

func (*ChainDescribeResponse) GetId

func (x *ChainDescribeResponse) GetId() string

func (*ChainDescribeResponse) GetKmsImage

func (x *ChainDescribeResponse) GetKmsImage() string

func (*ChainDescribeResponse) GetName

func (x *ChainDescribeResponse) GetName() string

func (*ChainDescribeResponse) GetNamespace

func (x *ChainDescribeResponse) GetNamespace() string

func (*ChainDescribeResponse) GetNetworkImage

func (x *ChainDescribeResponse) GetNetworkImage() string

func (*ChainDescribeResponse) GetNodes

func (x *ChainDescribeResponse) GetNodes() []*node.Node

func (*ChainDescribeResponse) GetPrevHash

func (x *ChainDescribeResponse) GetPrevHash() string

func (*ChainDescribeResponse) GetStatus

func (x *ChainDescribeResponse) GetStatus() Status

func (*ChainDescribeResponse) GetStorageImage

func (x *ChainDescribeResponse) GetStorageImage() string

func (*ChainDescribeResponse) GetTimestamp

func (x *ChainDescribeResponse) GetTimestamp() int64

func (*ChainDescribeResponse) ProtoMessage

func (*ChainDescribeResponse) ProtoMessage()

func (*ChainDescribeResponse) ProtoReflect

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

func (*ChainDescribeResponse) Reset

func (x *ChainDescribeResponse) Reset()

func (*ChainDescribeResponse) String

func (x *ChainDescribeResponse) String() string

type ChainList

type ChainList struct {
	Chains []*ChainSimpleResponse `protobuf:"bytes,1,rep,name=chains,proto3" json:"chains,omitempty"`
	// contains filtered or unexported fields
}

func (*ChainList) Descriptor deprecated

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

Deprecated: Use ChainList.ProtoReflect.Descriptor instead.

func (*ChainList) GetChains

func (x *ChainList) GetChains() []*ChainSimpleResponse

func (*ChainList) ProtoMessage

func (*ChainList) ProtoMessage()

func (*ChainList) ProtoReflect

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

func (*ChainList) Reset

func (x *ChainList) Reset()

func (*ChainList) String

func (x *ChainList) String() string

type ChainOnlineRequest

type ChainOnlineRequest struct {
	Name      string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"`
	// contains filtered or unexported fields
}

func (*ChainOnlineRequest) Descriptor deprecated

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

Deprecated: Use ChainOnlineRequest.ProtoReflect.Descriptor instead.

func (*ChainOnlineRequest) GetName

func (x *ChainOnlineRequest) GetName() string

func (*ChainOnlineRequest) GetNamespace

func (x *ChainOnlineRequest) GetNamespace() string

func (*ChainOnlineRequest) ProtoMessage

func (*ChainOnlineRequest) ProtoMessage()

func (*ChainOnlineRequest) ProtoReflect

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

func (*ChainOnlineRequest) Reset

func (x *ChainOnlineRequest) Reset()

func (*ChainOnlineRequest) String

func (x *ChainOnlineRequest) String() string

type ChainServiceClient

type ChainServiceClient interface {
	Init(ctx context.Context, in *Chain, opts ...grpc.CallOption) (*ChainSimpleResponse, error)
	List(ctx context.Context, in *ListChainRequest, opts ...grpc.CallOption) (*ChainList, error)
	Online(ctx context.Context, in *ChainOnlineRequest, opts ...grpc.CallOption) (*ChainSimpleResponse, error)
	Describe(ctx context.Context, in *ChainDescribeRequest, opts ...grpc.CallOption) (*ChainDescribeResponse, error)
	Delete(ctx context.Context, in *ChainDeleteRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

ChainServiceClient is the client API for ChainService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

type ChainServiceServer

ChainServiceServer is the server API for ChainService service.

type ChainSimpleResponse

type ChainSimpleResponse struct {
	Name      string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"`
	Status    Status `protobuf:"varint,3,opt,name=status,proto3,enum=chain.Status" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*ChainSimpleResponse) Descriptor deprecated

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

Deprecated: Use ChainSimpleResponse.ProtoReflect.Descriptor instead.

func (*ChainSimpleResponse) GetName

func (x *ChainSimpleResponse) GetName() string

func (*ChainSimpleResponse) GetNamespace

func (x *ChainSimpleResponse) GetNamespace() string

func (*ChainSimpleResponse) GetStatus

func (x *ChainSimpleResponse) GetStatus() Status

func (*ChainSimpleResponse) ProtoMessage

func (*ChainSimpleResponse) ProtoMessage()

func (*ChainSimpleResponse) ProtoReflect

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

func (*ChainSimpleResponse) Reset

func (x *ChainSimpleResponse) Reset()

func (*ChainSimpleResponse) String

func (x *ChainSimpleResponse) String() string

type ConsensusType

type ConsensusType int32
const (
	ConsensusType_UnknownConsensusType ConsensusType = 0
	ConsensusType_BFT                  ConsensusType = 1
	ConsensusType_Raft                 ConsensusType = 2
)

func (ConsensusType) Descriptor

func (ConsensusType) Enum

func (x ConsensusType) Enum() *ConsensusType

func (ConsensusType) EnumDescriptor deprecated

func (ConsensusType) EnumDescriptor() ([]byte, []int)

Deprecated: Use ConsensusType.Descriptor instead.

func (ConsensusType) Number

func (ConsensusType) String

func (x ConsensusType) String() string

func (ConsensusType) Type

type ListChainRequest

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

func (*ListChainRequest) Descriptor deprecated

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

Deprecated: Use ListChainRequest.ProtoReflect.Descriptor instead.

func (*ListChainRequest) GetNamespace

func (x *ListChainRequest) GetNamespace() string

func (*ListChainRequest) ProtoMessage

func (*ListChainRequest) ProtoMessage()

func (*ListChainRequest) ProtoReflect

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

func (*ListChainRequest) Reset

func (x *ListChainRequest) Reset()

func (*ListChainRequest) String

func (x *ListChainRequest) String() string

type Status

type Status int32
const (
	Status_UnknownStatus Status = 0
	Status_Online        Status = 1
	Status_Publicizing   Status = 2
)

func (Status) Descriptor

func (Status) Descriptor() protoreflect.EnumDescriptor

func (Status) Enum

func (x Status) Enum() *Status

func (Status) EnumDescriptor deprecated

func (Status) EnumDescriptor() ([]byte, []int)

Deprecated: Use Status.Descriptor instead.

func (Status) Number

func (x Status) Number() protoreflect.EnumNumber

func (Status) String

func (x Status) String() string

func (Status) Type

func (Status) Type() protoreflect.EnumType

type UnimplementedChainServiceServer

type UnimplementedChainServiceServer struct {
}

UnimplementedChainServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedChainServiceServer) Delete

func (*UnimplementedChainServiceServer) Describe

func (*UnimplementedChainServiceServer) Init

func (*UnimplementedChainServiceServer) List

func (*UnimplementedChainServiceServer) Online

Jump to

Keyboard shortcuts

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