clientset

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PreRun  hookType = "pre"
	PostRun hookType = "post"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Authenticator

type Authenticator interface {
	IsAuthenticated(ctx context.Context) (bool, error)
	GetCurrentAccount(ctx context.Context) (public.Account, error)
}

type ClientSet

type ClientSet struct {
	Authenticator  Authenticator
	PlatformClient client.Client
}

func (*ClientSet) EnsureSignedIn

func (c *ClientSet) EnsureSignedIn(cmd *cobra.Command, _ []string) error

func (*ClientSet) EnsureSignedInPreHook

func (c *ClientSet) EnsureSignedInPreHook(cmd *cobra.Command, args []string) error

func (*ClientSet) GetTenantID

func (c *ClientSet) GetTenantID(ctx context.Context) (string, error)

GetTenantID extracts the tenant ID from the current account's HomeAccountID. The HomeAccountID format is "<oid>.<tid>" where tid is the tenant ID.

func (*ClientSet) PostHooks

func (c *ClientSet) PostHooks(hooks ...Hook) Hook

func (*ClientSet) PreHooks

func (c *ClientSet) PreHooks(hooks ...Hook) Hook

type Hook

type Hook func(cmd *cobra.Command, args []string) error

Jump to

Keyboard shortcuts

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