v1

package
v12.0.0-rc9 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2025 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthBandwidth        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowBandwidth          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupBandwidth = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthPrice        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowPrice          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupPrice = fmt.Errorf("proto: unexpected end of group")
)
View Source
var RenewalPricePolicy_name = map[int32]string{
	0: "RENEWAL_PRICE_POLICY_UNSPECIFIED",
	1: "RENEWAL_PRICE_POLICY_IF_LESSER",
	2: "RENEWAL_PRICE_POLICY_IF_LESSER_OR_EQUAL",
	3: "RENEWAL_PRICE_POLICY_IF_EQUAL",
	4: "RENEWAL_PRICE_POLICY_IF_NOT_EQUAL",
	5: "RENEWAL_PRICE_POLICY_IF_GREATER",
	6: "RENEWAL_PRICE_POLICY_IF_GREATER_OR_EQUAL",
	7: "RENEWAL_PRICE_POLICY_ALWAYS",
}
View Source
var RenewalPricePolicy_value = map[string]int32{
	"RENEWAL_PRICE_POLICY_UNSPECIFIED":         0,
	"RENEWAL_PRICE_POLICY_IF_LESSER":           1,
	"RENEWAL_PRICE_POLICY_IF_LESSER_OR_EQUAL":  2,
	"RENEWAL_PRICE_POLICY_IF_EQUAL":            3,
	"RENEWAL_PRICE_POLICY_IF_NOT_EQUAL":        4,
	"RENEWAL_PRICE_POLICY_IF_GREATER":          5,
	"RENEWAL_PRICE_POLICY_IF_GREATER_OR_EQUAL": 6,
	"RENEWAL_PRICE_POLICY_ALWAYS":              7,
}
View Source
var Status_name = map[int32]string{
	0: "STATUS_UNSPECIFIED",
	1: "STATUS_ACTIVE",
	2: "STATUS_INACTIVE_PENDING",
	3: "STATUS_INACTIVE",
}
View Source
var Status_value = map[string]int32{
	"STATUS_UNSPECIFIED":      0,
	"STATUS_ACTIVE":           1,
	"STATUS_INACTIVE_PENDING": 2,
	"STATUS_INACTIVE":         3,
}

Functions

This section is empty.

Types

type Bandwidth

type Bandwidth struct {
	Upload   cosmossdk_io_math.Int `protobuf:"bytes,1,opt,name=upload,proto3,customtype=cosmossdk.io/math.Int" json:"upload"`
	Download cosmossdk_io_math.Int `protobuf:"bytes,2,opt,name=download,proto3,customtype=cosmossdk.io/math.Int" json:"download"`
}

func NewBandwidth

func NewBandwidth(upload, download sdkmath.Int) Bandwidth

func NewBandwidthFromInt64

func NewBandwidthFromInt64(upload, download int64) Bandwidth

func (Bandwidth) Add

func (b Bandwidth) Add(v Bandwidth) Bandwidth

func (Bandwidth) CeilTo

func (b Bandwidth) CeilTo(pre sdkmath.Int) Bandwidth

func (*Bandwidth) Descriptor

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

func (Bandwidth) IsAllLTE

func (b Bandwidth) IsAllLTE(v Bandwidth) bool

func (Bandwidth) IsAllPositive

func (b Bandwidth) IsAllPositive() bool

func (Bandwidth) IsAllZero

func (b Bandwidth) IsAllZero() bool

func (Bandwidth) IsAnyGT

func (b Bandwidth) IsAnyGT(v Bandwidth) bool

func (Bandwidth) IsAnyNegative

func (b Bandwidth) IsAnyNegative() bool

func (Bandwidth) IsAnyNil

func (b Bandwidth) IsAnyNil() bool

func (Bandwidth) IsAnyZero

func (b Bandwidth) IsAnyZero() bool

func (*Bandwidth) Marshal

func (m *Bandwidth) Marshal() (dAtA []byte, err error)

func (*Bandwidth) MarshalTo

func (m *Bandwidth) MarshalTo(dAtA []byte) (int, error)

func (*Bandwidth) MarshalToSizedBuffer

func (m *Bandwidth) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Bandwidth) ProtoMessage

func (*Bandwidth) ProtoMessage()

func (*Bandwidth) Reset

func (m *Bandwidth) Reset()

func (*Bandwidth) Size

func (m *Bandwidth) Size() (n int)

func (*Bandwidth) String

func (m *Bandwidth) String() string

func (Bandwidth) Sub

func (b Bandwidth) Sub(v Bandwidth) Bandwidth

func (Bandwidth) Sum

func (b Bandwidth) Sum() sdkmath.Int

func (*Bandwidth) Unmarshal

func (m *Bandwidth) Unmarshal(dAtA []byte) error

func (*Bandwidth) XXX_DiscardUnknown

func (m *Bandwidth) XXX_DiscardUnknown()

func (*Bandwidth) XXX_Marshal

func (m *Bandwidth) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Bandwidth) XXX_Merge

func (m *Bandwidth) XXX_Merge(src proto.Message)

func (*Bandwidth) XXX_Size

func (m *Bandwidth) XXX_Size() int

func (*Bandwidth) XXX_Unmarshal

func (m *Bandwidth) XXX_Unmarshal(b []byte) error

type Price

type Price struct {
	Denom      string                      `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"`
	BaseValue  cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=base_value,json=baseValue,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"base_value"`
	QuoteValue cosmossdk_io_math.Int       `protobuf:"bytes,3,opt,name=quote_value,json=quoteValue,proto3,customtype=cosmossdk.io/math.Int" json:"quote_value"`
}

func NewPriceFromString

func NewPriceFromString(s string) (Price, error)

func ZeroPrice

func ZeroPrice(denom string) Price

func (Price) Add

func (p Price) Add(v Price) Price

func (Price) BasePrice

func (p Price) BasePrice() sdk.DecCoin

func (Price) Copy

func (p Price) Copy() Price

func (*Price) Descriptor

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

func (Price) IsEqual

func (p Price) IsEqual(v Price) bool

func (Price) IsValid

func (p Price) IsValid() bool

func (*Price) Marshal

func (m *Price) Marshal() (dAtA []byte, err error)

func (*Price) MarshalTo

func (m *Price) MarshalTo(dAtA []byte) (int, error)

func (*Price) MarshalToSizedBuffer

func (m *Price) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Price) ProtoMessage

func (*Price) ProtoMessage()

func (Price) QuotePrice

func (p Price) QuotePrice() sdk.Coin

func (*Price) Reset

func (m *Price) Reset()

func (*Price) Size

func (m *Price) Size() (n int)

func (Price) String

func (p Price) String() string

func (Price) Sub

func (p Price) Sub(v Price) Price

func (*Price) Unmarshal

func (m *Price) Unmarshal(dAtA []byte) error

func (Price) UpdateQuoteValue

func (p Price) UpdateQuoteValue(ctx sdk.Context, fn QuotePriceFunc) (Price, error)

func (Price) Validate

func (p Price) Validate() error

func (*Price) XXX_DiscardUnknown

func (m *Price) XXX_DiscardUnknown()

func (*Price) XXX_Marshal

func (m *Price) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Price) XXX_Merge

func (m *Price) XXX_Merge(src proto.Message)

func (*Price) XXX_Size

func (m *Price) XXX_Size() int

func (*Price) XXX_Unmarshal

func (m *Price) XXX_Unmarshal(b []byte) error

type Prices

type Prices []Price

func NewPricesFromString

func NewPricesFromString(s string) (Prices, error)

func (Prices) Add

func (p Prices) Add(items ...Price) Prices

func (Prices) AmountOf

func (p Prices) AmountOf(denom string) (sdkmath.LegacyDec, sdkmath.Int)

func (Prices) Copy

func (p Prices) Copy() Prices

func (Prices) Find

func (p Prices) Find(denom string) (Price, bool)

func (Prices) IndexOf

func (p Prices) IndexOf(denom string) int

func (Prices) IsEqual

func (p Prices) IsEqual(v Prices) bool

func (Prices) IsSorted

func (p Prices) IsSorted() bool

func (Prices) IsValid

func (p Prices) IsValid() bool

func (Prices) Len

func (p Prices) Len() int

func (Prices) Less

func (p Prices) Less(i, j int) bool

func (Prices) Sort

func (p Prices) Sort() Prices

func (Prices) String

func (p Prices) String() string

func (Prices) Sub

func (p Prices) Sub(items ...Price) Prices

func (Prices) Swap

func (p Prices) Swap(i, j int)

func (Prices) Validate

func (p Prices) Validate() error

type QuotePriceFunc

type QuotePriceFunc func(ctx sdk.Context, basePrice sdk.DecCoin) (sdk.Coin, error)

type RenewalPricePolicy

type RenewalPricePolicy int32

Enum for renewal price policies

const (
	RenewalPricePolicyUnspecified      RenewalPricePolicy = 0
	RenewalPricePolicyIfLesser         RenewalPricePolicy = 1
	RenewalPricePolicyIfLesserOrEqual  RenewalPricePolicy = 2
	RenewalPricePolicyIfEqual          RenewalPricePolicy = 3
	RenewalPricePolicyIfNotEqual       RenewalPricePolicy = 4
	RenewalPricePolicyIfGreater        RenewalPricePolicy = 5
	RenewalPricePolicyIfGreaterOrEqual RenewalPricePolicy = 6
	RenewalPricePolicyAlways           RenewalPricePolicy = 7
)

func RenewalPricePolicyFromString

func RenewalPricePolicyFromString(s string) RenewalPricePolicy

RenewalPricePolicyFromString converts a string to a RenewalPricePolicy.

func (RenewalPricePolicy) EnumDescriptor

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

func (RenewalPricePolicy) Equal

Equal checks if two RenewalPricePolicy values are equal.

func (RenewalPricePolicy) IsValid

func (r RenewalPricePolicy) IsValid() bool

IsValid checks whether the RenewalPricePolicy is a valid value.

func (RenewalPricePolicy) String

func (r RenewalPricePolicy) String() string

String converts a RenewalPricePolicy to its string representation.

func (RenewalPricePolicy) Validate

func (r RenewalPricePolicy) Validate(curr, prev Price) error

type Status

type Status int32
const (
	StatusUnspecified     Status = 0
	StatusActive          Status = 1
	StatusInactivePending Status = 2
	StatusInactive        Status = 3
)

func StatusFromString

func StatusFromString(s string) Status

func (Status) EnumDescriptor

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

func (Status) Equal

func (s Status) Equal(v Status) bool

func (Status) IsOneOf

func (s Status) IsOneOf(items ...Status) bool

func (Status) IsValid

func (s Status) IsValid() bool

func (Status) String

func (s Status) String() string

Jump to

Keyboard shortcuts

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