chains

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ChainStatus_name = map[int32]string{
		0: "CS_NONE",
		1: "CS_OFFLINE",
		2: "CS_ONLINE",
		3: "CS_DISABLED",
		4: "CS_WIP",
	}
	ChainStatus_value = map[string]int32{
		"CS_NONE":     0,
		"CS_OFFLINE":  1,
		"CS_ONLINE":   2,
		"CS_DISABLED": 3,
		"CS_WIP":      4,
	}
)

Enum value maps for ChainStatus.

View Source
var Chains_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "unpack.v1.chains.Chains",
	HandlerType: (*ChainsServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Filter",
			Handler:    _Chains_Filter_Handler,
		},
		{
			MethodName: "Get",
			Handler:    _Chains_Get_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "chains/chains.proto",
}

Chains_ServiceDesc is the grpc.ServiceDesc for Chains 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_chains_chains_proto protoreflect.FileDescriptor

Functions

func RegisterChainsServer

func RegisterChainsServer(s grpc.ServiceRegistrar, srv ChainsServer)

Types

type Chain

type Chain struct {
	Id                 uint64               `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	ChainId            uint64               `protobuf:"varint,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
	Name               string               `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	Address            string               `protobuf:"bytes,4,opt,name=address,proto3" json:"address,omitempty"`
	LatestBlock        uint64               `protobuf:"varint,5,opt,name=latest_block,json=latestBlock,proto3" json:"latest_block,omitempty"`
	LatestIndexedBlock uint64               `protobuf:"varint,6,opt,name=latest_indexed_block,json=latestIndexedBlock,proto3" json:"latest_indexed_block,omitempty"`
	TotalIndexedBlocks uint64               `protobuf:"varint,7,opt,name=total_indexed_blocks,json=totalIndexedBlocks,proto3" json:"total_indexed_blocks,omitempty"`
	AverageIndexTimeMs uint64               `protobuf:"varint,8,opt,name=average_index_time_ms,json=averageIndexTimeMs,proto3" json:"average_index_time_ms,omitempty"`
	Status             ChainStatus          `protobuf:"varint,9,opt,name=status,proto3,enum=unpack.v1.chains.ChainStatus" json:"status,omitempty"`
	CreationTimestamp  *timestamp.Timestamp `protobuf:"bytes,10,opt,name=creation_timestamp,json=creationTimestamp,proto3" json:"creation_timestamp,omitempty"`
	// contains filtered or unexported fields
}

The Token protocol buffer message defines a standardized data format for representing token objects. It includes fields such as the token identifier, blockchain identifier, token name, description, symbol, decimal places, total supply, creation information, owner information, and security information. The message can be used in a variety of contexts to provide a standardized way of representing token objects.

func (*Chain) Descriptor deprecated

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

Deprecated: Use Chain.ProtoReflect.Descriptor instead.

func (*Chain) GetAddress

func (x *Chain) GetAddress() string

func (*Chain) GetAverageIndexTimeMs

func (x *Chain) GetAverageIndexTimeMs() uint64

func (*Chain) GetChainId

func (x *Chain) GetChainId() uint64

func (*Chain) GetCreationTimestamp

func (x *Chain) GetCreationTimestamp() *timestamp.Timestamp

func (*Chain) GetId

func (x *Chain) GetId() uint64

func (*Chain) GetLatestBlock

func (x *Chain) GetLatestBlock() uint64

func (*Chain) GetLatestIndexedBlock

func (x *Chain) GetLatestIndexedBlock() uint64

func (*Chain) GetName

func (x *Chain) GetName() string

func (*Chain) GetStatus

func (x *Chain) GetStatus() ChainStatus

func (*Chain) GetTotalIndexedBlocks

func (x *Chain) GetTotalIndexedBlocks() uint64

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 ChainStatus

type ChainStatus int32
const (
	ChainStatus_CS_NONE     ChainStatus = 0
	ChainStatus_CS_OFFLINE  ChainStatus = 1
	ChainStatus_CS_ONLINE   ChainStatus = 2
	ChainStatus_CS_DISABLED ChainStatus = 3
	ChainStatus_CS_WIP      ChainStatus = 4
)

func (ChainStatus) Descriptor

func (ChainStatus) Enum

func (x ChainStatus) Enum() *ChainStatus

func (ChainStatus) EnumDescriptor deprecated

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

Deprecated: Use ChainStatus.Descriptor instead.

func (ChainStatus) Number

func (x ChainStatus) Number() protoreflect.EnumNumber

func (ChainStatus) String

func (x ChainStatus) String() string

func (ChainStatus) Type

type ChainsClient

type ChainsClient interface {
	Filter(ctx context.Context, in *FilterChainRequest, opts ...grpc.CallOption) (*FilterChainResponse, error)
	Get(ctx context.Context, in *GetChainRequest, opts ...grpc.CallOption) (*GetChainResponse, error)
}

ChainsClient is the client API for Chains 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 NewChainsClient

func NewChainsClient(cc grpc.ClientConnInterface) ChainsClient

type ChainsServer

type ChainsServer interface {
	Filter(context.Context, *FilterChainRequest) (*FilterChainResponse, error)
	Get(context.Context, *GetChainRequest) (*GetChainResponse, error)
	// contains filtered or unexported methods
}

ChainsServer is the server API for Chains service. All implementations must embed UnimplementedChainsServer for forward compatibility

type FilterChainRequest

type FilterChainRequest struct {
	Status *common.Status `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*FilterChainRequest) Descriptor deprecated

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

Deprecated: Use FilterChainRequest.ProtoReflect.Descriptor instead.

func (*FilterChainRequest) GetStatus

func (x *FilterChainRequest) GetStatus() *common.Status

func (*FilterChainRequest) ProtoMessage

func (*FilterChainRequest) ProtoMessage()

func (*FilterChainRequest) ProtoReflect

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

func (*FilterChainRequest) Reset

func (x *FilterChainRequest) Reset()

func (*FilterChainRequest) String

func (x *FilterChainRequest) String() string

type FilterChainResponse

type FilterChainResponse struct {
	Status *common.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	Chains []*Chain       `protobuf:"bytes,2,rep,name=chains,proto3" json:"chains,omitempty"`
	// contains filtered or unexported fields
}

func (*FilterChainResponse) Descriptor deprecated

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

Deprecated: Use FilterChainResponse.ProtoReflect.Descriptor instead.

func (*FilterChainResponse) GetChains

func (x *FilterChainResponse) GetChains() []*Chain

func (*FilterChainResponse) GetStatus

func (x *FilterChainResponse) GetStatus() *common.Status

func (*FilterChainResponse) ProtoMessage

func (*FilterChainResponse) ProtoMessage()

func (*FilterChainResponse) ProtoReflect

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

func (*FilterChainResponse) Reset

func (x *FilterChainResponse) Reset()

func (*FilterChainResponse) String

func (x *FilterChainResponse) String() string

type GetChainRequest

type GetChainRequest struct {
	ChainId uint64 `protobuf:"varint,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
	Id      uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*GetChainRequest) Descriptor deprecated

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

Deprecated: Use GetChainRequest.ProtoReflect.Descriptor instead.

func (*GetChainRequest) GetChainId

func (x *GetChainRequest) GetChainId() uint64

func (*GetChainRequest) GetId

func (x *GetChainRequest) GetId() uint64

func (*GetChainRequest) ProtoMessage

func (*GetChainRequest) ProtoMessage()

func (*GetChainRequest) ProtoReflect

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

func (*GetChainRequest) Reset

func (x *GetChainRequest) Reset()

func (*GetChainRequest) String

func (x *GetChainRequest) String() string

type GetChainResponse

type GetChainResponse struct {
	Status *common.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	Chain  *Chain         `protobuf:"bytes,2,opt,name=chain,proto3" json:"chain,omitempty"`
	// contains filtered or unexported fields
}

func (*GetChainResponse) Descriptor deprecated

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

Deprecated: Use GetChainResponse.ProtoReflect.Descriptor instead.

func (*GetChainResponse) GetChain

func (x *GetChainResponse) GetChain() *Chain

func (*GetChainResponse) GetStatus

func (x *GetChainResponse) GetStatus() *common.Status

func (*GetChainResponse) ProtoMessage

func (*GetChainResponse) ProtoMessage()

func (*GetChainResponse) ProtoReflect

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

func (*GetChainResponse) Reset

func (x *GetChainResponse) Reset()

func (*GetChainResponse) String

func (x *GetChainResponse) String() string

type UnimplementedChainsServer

type UnimplementedChainsServer struct {
}

UnimplementedChainsServer must be embedded to have forward compatible implementations.

func (UnimplementedChainsServer) Filter

func (UnimplementedChainsServer) Get

type UnsafeChainsServer

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

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

Jump to

Keyboard shortcuts

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