shared

package
v0.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateUUIDV4

func GenerateUUIDV4() uuid.UUID

func GenerateUUIDV6

func GenerateUUIDV6() uuid.UUID

func GenerateUUIDV7

func GenerateUUIDV7() uuid.UUID

func HashMD5

func HashMD5(source string) string

func PrettyJSON

func PrettyJSON(source string) (string, error)

Types

type Delta

type Delta struct {
	Value     int
	Operation DeltaOperation
}

func DeltaZero

func DeltaZero() *Delta

func NewDeltaFromString

func NewDeltaFromString(str string) (*Delta, error)

func (*Delta) ExecuteOperation

func (d *Delta) ExecuteOperation(value int) int

type DeltaOperation

type DeltaOperation string
const (
	DeltaOperationAdd DeltaOperation = "+"
	DeltaOperationSub DeltaOperation = "-"
	DeltaOperationMul DeltaOperation = "*"
	DeltaOperationDiv DeltaOperation = "/"
)

func (DeltaOperation) Execute

func (d DeltaOperation) Execute(first, second int) int

type Range

type Range struct {
	From int
	To   int
}

func RangeFromString

func RangeFromString(value string) (*Range, error)

func (*Range) IsDescending

func (r *Range) IsDescending() bool

func (*Range) Iterate

func (r *Range) Iterate(fn func(int) error) error

func (*Range) Len

func (r *Range) Len() int

type TgBot added in v0.2.0

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

func NewTgBot added in v0.2.0

func NewTgBot(host string) *TgBot

func (*TgBot) GetUpdates added in v0.2.0

func (b *TgBot) GetUpdates(ctx context.Context, token string) (string, error)

Jump to

Keyboard shortcuts

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