actions

package
v0.0.40 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2022 License: MIT Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DiscoverFlags added in v0.0.4

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

DiscoverFlags ...

func GenerateFlags

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

GenerateFlags ...

func LoginFlags

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

LoginFlags ...

func MenuFlags(ctx context.Context) ([]cli.Flag, error)

MenuFlags ...

Types

type DiscoverClient added in v0.0.19

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

DiscoverClient ...

func (*DiscoverClient) Discover added in v0.0.19

func (client *DiscoverClient) Discover(ctx context.Context) (string, error)

Discover ...

func (*DiscoverClient) Run added in v0.0.19

func (client *DiscoverClient) Run(ctx context.Context) ([]discover, error)

type DiscoverInterface added in v0.0.19

type DiscoverInterface interface {
	Discover(ctx context.Context) (string, error)
	Run(ctx context.Context) ([]discover, error)
}

DiscoverInterface ...

func NewDiscoverClient added in v0.0.19

func NewDiscoverClient(ctx context.Context, c *cli.Context) (DiscoverInterface, error)

NewDiscoverClient ...

type GenerateClient added in v0.0.19

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

GenerateClient ...

func (*GenerateClient) Generate added in v0.0.19

func (client *GenerateClient) Generate(ctx context.Context) error

Generate ...

func (*GenerateClient) Merge added in v0.0.19

func (client *GenerateClient) Merge(new GenerateClient)

type GenerateInterface added in v0.0.19

type GenerateInterface interface {
	Generate(ctx context.Context) error
	Merge(new GenerateClient)
}

GenerateInterface ...

func NewGenerateClient added in v0.0.19

func NewGenerateClient(ctx context.Context, c *cli.Context) (GenerateInterface, error)

NewGenerateClient ...

type LoginClient added in v0.0.19

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

LoginClient ...

func (*LoginClient) Login added in v0.0.19

func (client *LoginClient) Login(ctx context.Context) (string, error)

Login ...

type LoginInterface added in v0.0.19

type LoginInterface interface {
	Login(ctx context.Context) (string, error)
}

LoginInterface ...

func NewLoginClient added in v0.0.19

func NewLoginClient(ctx context.Context, c *cli.Context) (LoginInterface, error)

NewLoginClient ...

type MenuClient struct {
	// contains filtered or unexported fields
}
func (client *MenuClient) Menu(ctx context.Context) error

Menu ...

type MenuInterface interface {
	Menu(ctx context.Context) error
}

func NewMenuClient added in v0.0.19

func NewMenuClient(ctx context.Context, c *cli.Context) (MenuInterface, error)

NewMenuClient ...

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

func (*Token) Valid added in v0.0.17

func (t *Token) Valid() bool

Valid reports whether t is non-nil, has an AccessToken, and is not expired.

type Tokens

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

Tokens contains the token struct

func (Tokens) GetToken

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

GetToken ...

func (Tokens) GetTokenCacheFilePath added in v0.0.39

func (t Tokens) GetTokenCacheFilePath() string

GetTokenCacheFilePath returns the path where the cached tokens are stored

func (Tokens) SetToken

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

SetToken ...

type TokensInterface

type TokensInterface interface {
	GetTokenCacheFilePath() 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, tokenCacheDir string, defaultAzureCredentialOptions 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