value

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package value manages key-value pairs, conforming to the [internal.KeyValue] interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IPNet

type IPNet[K fmt.Stringer] net.IPNet

func (IPNet[K]) Key

func (ipnet IPNet[K]) Key() string

func (IPNet[K]) String

func (ipnet IPNet[K]) String() string

type Int64

type Int64[K fmt.Stringer] int64

func (Int64[K]) Key

func (v Int64[K]) Key() string

func (Int64[K]) String

func (v Int64[K]) String() string

type Key

type Key[K fmt.Stringer, Type wgkey.Type] wgkey.Key[Type]

func (Key[K, Type]) Key

func (key Key[K, Type]) Key() string

func (Key[K, Type]) MarshalText

func (key Key[K, Type]) MarshalText() ([]byte, error)

MarshalText converts the key into a base64 string.

func (Key[K, Type]) Public

func (key Key[K, Type]) Public() (public Key[K, wgkey.Public], err error)

Public converts the keys to a public key. An error will only be returned if the key is not a private key.

func (Key[K, Type]) String

func (key Key[K, Type]) String() string

func (*Key[K, Type]) UnmarshalText

func (key *Key[K, Type]) UnmarshalText(text []byte) error

UnmarshalText parses a key in base64 format.

type One

type One[K fmt.Stringer] struct{}

func (One[K]) Key

func (One[K]) Key() string

func (One[K]) String

func (One[K]) String() string

type True

type True[K fmt.Stringer] struct{}

func (True[K]) Key

func (True[K]) Key() string

func (True[K]) String

func (True[K]) String() string

type UDPAddr

type UDPAddr[K fmt.Stringer] net.UDPAddr

func (UDPAddr[K]) Key

func (addr UDPAddr[K]) Key() string

func (UDPAddr[K]) String

func (addr UDPAddr[K]) String() string

type Uint16

type Uint16[K fmt.Stringer] uint16

func (Uint16[K]) Key

func (v Uint16[K]) Key() string

func (Uint16[K]) String

func (v Uint16[K]) String() string

type Uint32

type Uint32[K fmt.Stringer] uint32

func (Uint32[K]) Key

func (v Uint32[K]) Key() string

func (Uint32[K]) String

func (v Uint32[K]) String() string

type Uint64

type Uint64[K fmt.Stringer] uint64

func (Uint64[K]) Key

func (v Uint64[K]) Key() string

func (Uint64[K]) String

func (v Uint64[K]) String() string

Directories

Path Synopsis
Package wgkey holds basic types for wireguard keys.
Package wgkey holds basic types for wireguard keys.

Jump to

Keyboard shortcuts

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