utils

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func KeyboardInteractivePassphraseFunc

func KeyboardInteractivePassphraseFunc(prompt string) func() ([]byte, error)

func ParseMap

func ParseMap(s string, namevalSep, tuplesSep rune) (res map[string]string, err error)

ParseMap returns parsed key/val map

func WriteRename added in v1.3.0

func WriteRename(path, tmpPrefix string, data []byte) (err error)

Types

type Options

type Options map[string]interface{}

func (Options) GetBool

func (o Options) GetBool(name string) (val bool, ok bool, err error)

func (Options) GetInt

func (o Options) GetInt(name string) (val int64, ok bool, err error)

func (Options) GetString

func (o Options) GetString(name string) (val string, ok bool, err error)

type SigningVersion added in v1.3.0

type SigningVersion uint8

SigningVersion represents the version of signing being used

const (
	// SigningVersion0 represents Signing version 0
	SigningVersion0 SigningVersion = 0
	// SigningVersion1 represents Signing version 1
	SigningVersion1 SigningVersion = 1
	// SigningVersion2 represents Signing version 2
	SigningVersion2 SigningVersion = 2
	// SigningVersionLatest represents the latest Signing version
	SigningVersionLatest SigningVersion = SigningVersion2
)

func ParseVersionString added in v1.3.0

func ParseVersionString(s string) SigningVersion

FromString parses a string and returns the corresponding SigningVersion and a bool indicating success.

func (SigningVersion) IsValid added in v1.3.0

func (v SigningVersion) IsValid() bool

IsValid checks if the SigningVersion is valid

func (SigningVersion) ToUint8 added in v1.3.0

func (v SigningVersion) ToUint8() uint8

ToUint8 converts SigningVersion to uint8 for compatibility with existing code

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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