powValueTypes

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2025 License: MIT Imports: 13 Imported by: 7

Documentation

Index

Constants

View Source
const (
	CreatedAtRepresentationFormat = time.RFC3339Nano
)
View Source
const (
	NonceRepresentationBase = 10
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CreatedAt

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

func NewCreatedAt

func NewCreatedAt(rawValue time.Time) (CreatedAt, error)

func ParseCreatedAt

func ParseCreatedAt(rawValue string) (CreatedAt, error)

func (CreatedAt) ToString

func (value CreatedAt) ToString() string

func (CreatedAt) ToTime

func (value CreatedAt) ToTime() time.Time

type Hash

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

func NewHash

func NewHash(rawValue hash.Hash) Hash

func NewHashWithName

func NewHashWithName(rawValue hash.Hash, name string) (Hash, error)

func (Hash) ApplyTo

func (value Hash) ApplyTo(data string) HashSum

func (Hash) Name

func (value Hash) Name() string

func (Hash) SizeInBits

func (value Hash) SizeInBits() int

func (Hash) SizeInBytes

func (value Hash) SizeInBytes() int

func (Hash) ToHash

func (value Hash) ToHash() hash.Hash

type HashDataLayout

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

func MustParseHashDataLayout

func MustParseHashDataLayout(rawValue string) HashDataLayout

func NewHashDataLayout

func NewHashDataLayout(rawValue *template.Template) HashDataLayout

func ParseHashDataLayout

func ParseHashDataLayout(rawValue string) (HashDataLayout, error)

func (HashDataLayout) Execute

func (value HashDataLayout) Execute(data any) (string, error)

func (HashDataLayout) ToString

func (value HashDataLayout) ToString() string

func (HashDataLayout) ToTemplate

func (value HashDataLayout) ToTemplate() *template.Template

type HashSum

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

func NewHashSum

func NewHashSum(rawValue []byte) HashSum

func (HashSum) Len

func (value HashSum) Len() int

func (HashSum) ToBytes

func (value HashSum) ToBytes() []byte

type LeadingZeroBitCount

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

func NewLeadingZeroBitCount

func NewLeadingZeroBitCount(rawValue int) (LeadingZeroBitCount, error)

func (LeadingZeroBitCount) ToInt

func (value LeadingZeroBitCount) ToInt() int

type Nonce

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

func NewNonce

func NewNonce(rawValue *big.Int) (Nonce, error)

func NewRandomNonce

func NewRandomNonce(params RandomNonceParams) (Nonce, error)

func NewZeroNonce

func NewZeroNonce() (Nonce, error)

func ParseNonce

func ParseNonce(rawValue string) (Nonce, error)

func (Nonce) Incremented

func (value Nonce) Incremented() (Nonce, error)

func (Nonce) ToBigInt

func (value Nonce) ToBigInt() *big.Int

func (Nonce) ToString

func (value Nonce) ToString() string

type RandomNonceParams

type RandomNonceParams struct {
	RandomReader io.Reader
	MinRawValue  *big.Int
	MaxRawValue  *big.Int
}

type Resource

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

func NewResource

func NewResource(rawValue *url.URL) Resource

func ParseResource

func ParseResource(rawValue string) (Resource, error)

func (Resource) ToString

func (value Resource) ToString() string

func (Resource) ToURL

func (value Resource) ToURL() *url.URL

type SerializedPayload

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

func NewSerializedPayload

func NewSerializedPayload(rawValue string) SerializedPayload

func (SerializedPayload) ToString

func (value SerializedPayload) ToString() string

type TTL

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

func NewTTL

func NewTTL(rawValue time.Duration) (TTL, error)

func ParseTTL

func ParseTTL(rawValue string) (TTL, error)

func (TTL) ToDuration

func (value TTL) ToDuration() time.Duration

func (TTL) ToString

func (value TTL) ToString() string

type TargetBitIndex

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

func NewTargetBitIndex

func NewTargetBitIndex(rawValue int) (TargetBitIndex, error)

func (TargetBitIndex) ToInt

func (value TargetBitIndex) ToInt() int

Jump to

Keyboard shortcuts

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