delegatepb

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Delegate_GetDelegates_FullMethodName       = "/delegatepb.Delegate/GetDelegates"
	Delegate_GetDelegateProfile_FullMethodName = "/delegatepb.Delegate/GetDelegateProfile"
)

Variables

View Source
var Delegate_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "delegatepb.Delegate",
	HandlerType: (*DelegateServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetDelegates",
			Handler:    _Delegate_GetDelegates_Handler,
		},
		{
			MethodName: "GetDelegateProfile",
			Handler:    _Delegate_GetDelegateProfile_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "delegatepb/delegate.proto",
}

Delegate_ServiceDesc is the grpc.ServiceDesc for Delegate 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_delegatepb_delegate_proto protoreflect.FileDescriptor

Functions

func RegisterDelegateServer

func RegisterDelegateServer(s grpc.ServiceRegistrar, srv DelegateServer)

Types

type DelegateClient

type DelegateClient interface {
	GetDelegates(ctx context.Context, in *GetDelegatesRequest, opts ...grpc.CallOption) (*GetDelegatesResponse, error)
	GetDelegateProfile(ctx context.Context, in *GetDelegateProfileRequest, opts ...grpc.CallOption) (*GetDelegateProfileResponse, error)
}

DelegateClient is the client API for Delegate 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 NewDelegateClient

func NewDelegateClient(cc grpc.ClientConnInterface) DelegateClient

type DelegateEntry

type DelegateEntry struct {
	Address              string  `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	DelegatorCount       int32   `protobuf:"varint,2,opt,name=delegator_count,json=delegatorCount,proto3" json:"delegator_count,omitempty"`
	PercentOfDelegators  float64 `protobuf:"fixed64,3,opt,name=percent_of_delegators,json=percentOfDelegators,proto3" json:"percent_of_delegators,omitempty"`
	VotingPower          float64 `protobuf:"fixed64,4,opt,name=voting_power,json=votingPower,proto3" json:"voting_power,omitempty"`
	PercentOfVotingPower float64 `` /* 127-byte string literal not displayed */
	About                string  `protobuf:"bytes,6,opt,name=about,proto3" json:"about,omitempty"`
	Statement            string  `protobuf:"bytes,7,opt,name=statement,proto3" json:"statement,omitempty"`
	// contains filtered or unexported fields
}

func (*DelegateEntry) Descriptor deprecated

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

Deprecated: Use DelegateEntry.ProtoReflect.Descriptor instead.

func (*DelegateEntry) GetAbout

func (x *DelegateEntry) GetAbout() string

func (*DelegateEntry) GetAddress

func (x *DelegateEntry) GetAddress() string

func (*DelegateEntry) GetDelegatorCount

func (x *DelegateEntry) GetDelegatorCount() int32

func (*DelegateEntry) GetPercentOfDelegators

func (x *DelegateEntry) GetPercentOfDelegators() float64

func (*DelegateEntry) GetPercentOfVotingPower

func (x *DelegateEntry) GetPercentOfVotingPower() float64

func (*DelegateEntry) GetStatement

func (x *DelegateEntry) GetStatement() string

func (*DelegateEntry) GetVotingPower

func (x *DelegateEntry) GetVotingPower() float64

func (*DelegateEntry) ProtoMessage

func (*DelegateEntry) ProtoMessage()

func (*DelegateEntry) ProtoReflect

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

func (*DelegateEntry) Reset

func (x *DelegateEntry) Reset()

func (*DelegateEntry) String

func (x *DelegateEntry) String() string

type DelegateServer

type DelegateServer interface {
	GetDelegates(context.Context, *GetDelegatesRequest) (*GetDelegatesResponse, error)
	GetDelegateProfile(context.Context, *GetDelegateProfileRequest) (*GetDelegateProfileResponse, error)
	// contains filtered or unexported methods
}

DelegateServer is the server API for Delegate service. All implementations must embed UnimplementedDelegateServer for forward compatibility.

type GetDelegateProfileRequest

type GetDelegateProfileRequest struct {
	DaoOriginalId string     `protobuf:"bytes,1,opt,name=dao_original_id,json=daoOriginalId,proto3" json:"dao_original_id,omitempty"`
	Address       string     `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
	Strategy      *anypb.Any `protobuf:"bytes,3,opt,name=strategy,proto3" json:"strategy,omitempty"`
	// contains filtered or unexported fields
}

func (*GetDelegateProfileRequest) Descriptor deprecated

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

Deprecated: Use GetDelegateProfileRequest.ProtoReflect.Descriptor instead.

func (*GetDelegateProfileRequest) GetAddress

func (x *GetDelegateProfileRequest) GetAddress() string

func (*GetDelegateProfileRequest) GetDaoOriginalId

func (x *GetDelegateProfileRequest) GetDaoOriginalId() string

func (*GetDelegateProfileRequest) GetStrategy

func (x *GetDelegateProfileRequest) GetStrategy() *anypb.Any

func (*GetDelegateProfileRequest) ProtoMessage

func (*GetDelegateProfileRequest) ProtoMessage()

func (*GetDelegateProfileRequest) ProtoReflect

func (*GetDelegateProfileRequest) Reset

func (x *GetDelegateProfileRequest) Reset()

func (*GetDelegateProfileRequest) String

func (x *GetDelegateProfileRequest) String() string

type GetDelegateProfileResponse

type GetDelegateProfileResponse struct {
	Address              string                 `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	VotingPower          float64                `protobuf:"fixed64,2,opt,name=voting_power,json=votingPower,proto3" json:"voting_power,omitempty"`
	IncomingPower        float64                `protobuf:"fixed64,3,opt,name=incoming_power,json=incomingPower,proto3" json:"incoming_power,omitempty"`
	OutgoingPower        float64                `protobuf:"fixed64,4,opt,name=outgoing_power,json=outgoingPower,proto3" json:"outgoing_power,omitempty"`
	PercentOfVotingPower float64                `` /* 127-byte string literal not displayed */
	PercentOfDelegators  float64                `protobuf:"fixed64,6,opt,name=percent_of_delegators,json=percentOfDelegators,proto3" json:"percent_of_delegators,omitempty"`
	Delegates            []*ProfileDelegateItem `protobuf:"bytes,7,rep,name=delegates,proto3" json:"delegates,omitempty"`
	Expiration           *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=expiration,proto3" json:"expiration,omitempty"`
	// contains filtered or unexported fields
}

func (*GetDelegateProfileResponse) Descriptor deprecated

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

Deprecated: Use GetDelegateProfileResponse.ProtoReflect.Descriptor instead.

func (*GetDelegateProfileResponse) GetAddress

func (x *GetDelegateProfileResponse) GetAddress() string

func (*GetDelegateProfileResponse) GetDelegates

func (x *GetDelegateProfileResponse) GetDelegates() []*ProfileDelegateItem

func (*GetDelegateProfileResponse) GetExpiration

func (x *GetDelegateProfileResponse) GetExpiration() *timestamppb.Timestamp

func (*GetDelegateProfileResponse) GetIncomingPower

func (x *GetDelegateProfileResponse) GetIncomingPower() float64

func (*GetDelegateProfileResponse) GetOutgoingPower

func (x *GetDelegateProfileResponse) GetOutgoingPower() float64

func (*GetDelegateProfileResponse) GetPercentOfDelegators

func (x *GetDelegateProfileResponse) GetPercentOfDelegators() float64

func (*GetDelegateProfileResponse) GetPercentOfVotingPower

func (x *GetDelegateProfileResponse) GetPercentOfVotingPower() float64

func (*GetDelegateProfileResponse) GetVotingPower

func (x *GetDelegateProfileResponse) GetVotingPower() float64

func (*GetDelegateProfileResponse) ProtoMessage

func (*GetDelegateProfileResponse) ProtoMessage()

func (*GetDelegateProfileResponse) ProtoReflect

func (*GetDelegateProfileResponse) Reset

func (x *GetDelegateProfileResponse) Reset()

func (*GetDelegateProfileResponse) String

func (x *GetDelegateProfileResponse) String() string

type GetDelegatesRequest

type GetDelegatesRequest struct {
	DaoOriginalId string     `protobuf:"bytes,1,opt,name=dao_original_id,json=daoOriginalId,proto3" json:"dao_original_id,omitempty"`
	Strategy      *anypb.Any `protobuf:"bytes,2,opt,name=strategy,proto3" json:"strategy,omitempty"`
	Addresses     []string   `protobuf:"bytes,3,rep,name=addresses,proto3" json:"addresses,omitempty"`
	Sort          *string    `protobuf:"bytes,4,opt,name=sort,proto3,oneof" json:"sort,omitempty"`
	Limit         int32      `protobuf:"varint,5,opt,name=limit,proto3" json:"limit,omitempty"`
	Offset        int32      `protobuf:"varint,6,opt,name=offset,proto3" json:"offset,omitempty"`
	// contains filtered or unexported fields
}

func (*GetDelegatesRequest) Descriptor deprecated

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

Deprecated: Use GetDelegatesRequest.ProtoReflect.Descriptor instead.

func (*GetDelegatesRequest) GetAddresses

func (x *GetDelegatesRequest) GetAddresses() []string

func (*GetDelegatesRequest) GetDaoOriginalId

func (x *GetDelegatesRequest) GetDaoOriginalId() string

func (*GetDelegatesRequest) GetLimit

func (x *GetDelegatesRequest) GetLimit() int32

func (*GetDelegatesRequest) GetOffset

func (x *GetDelegatesRequest) GetOffset() int32

func (*GetDelegatesRequest) GetSort

func (x *GetDelegatesRequest) GetSort() string

func (*GetDelegatesRequest) GetStrategy

func (x *GetDelegatesRequest) GetStrategy() *anypb.Any

func (*GetDelegatesRequest) ProtoMessage

func (*GetDelegatesRequest) ProtoMessage()

func (*GetDelegatesRequest) ProtoReflect

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

func (*GetDelegatesRequest) Reset

func (x *GetDelegatesRequest) Reset()

func (*GetDelegatesRequest) String

func (x *GetDelegatesRequest) String() string

type GetDelegatesResponse

type GetDelegatesResponse struct {
	Delegates []*DelegateEntry `protobuf:"bytes,1,rep,name=delegates,proto3" json:"delegates,omitempty"`
	Total     int32            `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"`
	// contains filtered or unexported fields
}

func (*GetDelegatesResponse) Descriptor deprecated

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

Deprecated: Use GetDelegatesResponse.ProtoReflect.Descriptor instead.

func (*GetDelegatesResponse) GetDelegates

func (x *GetDelegatesResponse) GetDelegates() []*DelegateEntry

func (*GetDelegatesResponse) GetTotal

func (x *GetDelegatesResponse) GetTotal() int32

func (*GetDelegatesResponse) ProtoMessage

func (*GetDelegatesResponse) ProtoMessage()

func (*GetDelegatesResponse) ProtoReflect

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

func (*GetDelegatesResponse) Reset

func (x *GetDelegatesResponse) Reset()

func (*GetDelegatesResponse) String

func (x *GetDelegatesResponse) String() string

type ProfileDelegateItem

type ProfileDelegateItem struct {
	Address        string  `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	Weight         float64 `protobuf:"fixed64,2,opt,name=weight,proto3" json:"weight,omitempty"`
	DelegatedPower float64 `protobuf:"fixed64,3,opt,name=delegated_power,json=delegatedPower,proto3" json:"delegated_power,omitempty"`
	// contains filtered or unexported fields
}

func (*ProfileDelegateItem) Descriptor deprecated

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

Deprecated: Use ProfileDelegateItem.ProtoReflect.Descriptor instead.

func (*ProfileDelegateItem) GetAddress

func (x *ProfileDelegateItem) GetAddress() string

func (*ProfileDelegateItem) GetDelegatedPower

func (x *ProfileDelegateItem) GetDelegatedPower() float64

func (*ProfileDelegateItem) GetWeight

func (x *ProfileDelegateItem) GetWeight() float64

func (*ProfileDelegateItem) ProtoMessage

func (*ProfileDelegateItem) ProtoMessage()

func (*ProfileDelegateItem) ProtoReflect

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

func (*ProfileDelegateItem) Reset

func (x *ProfileDelegateItem) Reset()

func (*ProfileDelegateItem) String

func (x *ProfileDelegateItem) String() string

type UnimplementedDelegateServer

type UnimplementedDelegateServer struct{}

UnimplementedDelegateServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedDelegateServer) GetDelegates

type UnsafeDelegateServer

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

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

Jump to

Keyboard shortcuts

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