types

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2025 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Endpoint

type Endpoint struct {
	Num      int
	Clusters cluster.Clusters
}

func (*Endpoint) AddCluster

func (e *Endpoint) AddCluster(cluster cluster.Cluster)

func (*Endpoint) HasCluster

func (e *Endpoint) HasCluster(clusterID cluster.ID) bool

type Endpoints

type Endpoints []*Endpoint

func (*Endpoints) AddEndpoint

func (e *Endpoints) AddEndpoint() *Endpoint

func (*Endpoints) LastEndpoint

func (e *Endpoints) LastEndpoint() *Endpoint

type Option

type Option[T any] struct {
	// contains filtered or unexported fields
}

func NewEmptyOption

func NewEmptyOption[T any]() Option[T]

func NewOption

func NewOption[T any](v T) Option[T]

func (Option[T]) Format

func (o Option[T]) Format(f fmt.State, verb rune)

Format is a proxy for Option to format value using some verb.

func (Option[T]) HasValue

func (o Option[T]) HasValue() bool

func (*Option[T]) Reset

func (o *Option[T]) Reset()

func (*Option[T]) Set

func (o *Option[T]) Set(v T)

func (Option[T]) String

func (o Option[T]) String() string

func (*Option[T]) UnmarshalYAML

func (o *Option[T]) UnmarshalYAML(n *yaml.Node) error

func (Option[T]) Value

func (o Option[T]) Value() T

type Pin

type Pin struct {
	ID       string
	Port     Option[uint8]
	Pin      Option[uint8]
	Inverted bool
}

func (Pin) Label

func (p Pin) Label() string

func (Pin) Name

func (p Pin) Name() string

func (Pin) NumericLabel

func (p Pin) NumericLabel() string

func (Pin) PinsDefined

func (p Pin) PinsDefined() bool

func (*Pin) UnmarshalYAML

func (p *Pin) UnmarshalYAML(value *yaml.Node) error

func (Pin) Valid

func (p Pin) Valid() bool

type PinWithID

type PinWithID struct {
	ID  string
	Pin Pin
}

PinWithID is similar to Pin, but the difference is that user can define ID & short Pin for this type.

So insted of `{id: 'some', port: 0, pin: 1}` user can provide `{id: 'some', pin: 0.04}`.

Still, probably there is a more elegant way to achieve this.

func (PinWithID) ToPin

func (p PinWithID) ToPin() Pin

type PinWithIDSlice

type PinWithIDSlice []PinWithID

func (PinWithIDSlice) ToPins

func (s PinWithIDSlice) ToPins() []Pin

type Semver

type Semver [3]uint8

func NewSemver

func NewSemver(major, minor, patch uint8) Semver

func ParseSemver

func ParseSemver(ver string) (Semver, error)

func (Semver) Compare

func (s Semver) Compare(another Semver) int

Compare returns -1 if receiver is smaller than another, 1 if receiver is larger than another and 0 if they are equal.

func (Semver) SameMajorMinor

func (s Semver) SameMajorMinor(another Semver) bool

SameMajorMinor checks if major and minor versions are equal.

func (Semver) String

func (s Semver) String() string

Directories

Path Synopsis
This package provides functionality to define configuration option with their values, and also define dependencies on other configuration options.
This package provides functionality to define configuration option with their values, and also define dependencies on other configuration options.
This package provides reasonable functionality to define overlay files for the boards.
This package provides reasonable functionality to define overlay files for the boards.

Jump to

Keyboard shortcuts

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