tokens

package
v1.14.2 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2024 License: Apache-2.0 Imports: 3 Imported by: 3

Documentation

Overview

Package tokens provides utility methods to store and load tokens to/from environment variables

Index

Constants

View Source
const (
	// EnvPrefix sriov token env name prefix
	EnvPrefix = "NSM_SRIOV_TOKENS_"
)

Variables

This section is empty.

Functions

func FromEnv

func FromEnv(envs []string) map[string][]string

FromEnv returns all stored tokens from the list of environment variables

func IsTokenID added in v1.1.0

func IsTokenID(s string) bool

IsTokenID returns if given string is a SR-IOV token ID

func NewTokenID added in v1.1.0

func NewTokenID() string

NewTokenID returns a new SR-IOV token ID

func ToEnv

func ToEnv(tokenName string, tokenIDs []string) (name, value string)

ToEnv returns a (name, value) pair to store given tokens into the environment variable

Types

This section is empty.

Jump to

Keyboard shortcuts

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