actions

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2021 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Discover added in v0.0.4

func Discover(ctx context.Context, cfg DiscoverConfig) (string, error)

Discover ...

func DiscoverFlags added in v0.0.4

func DiscoverFlags(ctx context.Context) []cli.Flag

DiscoverFlags ...

func Generate

func Generate(ctx context.Context, cfg GenerateConfig) error

Generate ...

func GenerateFlags

func GenerateFlags(ctx context.Context) []cli.Flag

GenerateFlags ...

func Login

func Login(ctx context.Context, cfg LoginConfig) (string, error)

Login ...

func LoginFlags

func LoginFlags(ctx context.Context) []cli.Flag

LoginFlags ...

Types

type DiscoverConfig added in v0.0.4

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

DiscoverConfig ...

func NewDiscoverConfig added in v0.0.4

func NewDiscoverConfig(ctx context.Context, c *cli.Context) (DiscoverConfig, error)

NewDiscoverConfig ...

type GenerateConfig

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

GenerateConfig ...

func NewGenerateConfig

func NewGenerateConfig(ctx context.Context, c *cli.Context) (GenerateConfig, error)

NewGenerateConfig ...

type LoginConfig

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

LoginConfig ...

func NewLoginConfig

func NewLoginConfig(ctx context.Context, c *cli.Context) (LoginConfig, error)

NewLoginConfig ...

type Token

type Token struct {
	Token               string    `json:"token"`
	ExpirationTimestamp time.Time `json:"expirationTimestamp"`
	Resource            string    `json:"resource"`
	Name                string    `json:"name"`
}

Token contains the struct for a cached token

type Tokens

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

Tokens contains the token struct

func (Tokens) GetPath

func (t Tokens) GetPath() string

GetPath returns the path where the cached tokens are stored

func (Tokens) GetToken

func (t Tokens) GetToken(ctx context.Context, name string, resource string) (Token, error)

GetToken ...

func (Tokens) SetToken

func (t Tokens) SetToken(ctx context.Context, name string, token Token) error

SetToken ...

type TokensInterface

type TokensInterface interface {
	GetPath() string
	GetToken(ctx context.Context, name string, resource string) (Token, error)
	SetToken(ctx context.Context, name string, token Token) error
}

TokensInterface is the interface for the Tokens struct

func NewTokens

func NewTokens(ctx context.Context, path string, defaultAzureCredentialOptions *azidentity.DefaultAzureCredentialOptions) (TokensInterface, error)

NewTokens returns a TokensInterface or error

Jump to

Keyboard shortcuts

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