utils

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetClientByConfig

func GetClientByConfig(clientConfig *harbor.ClientSetConfig) *v2client.HarborAPI

Returns Harbor v2 client for given clientConfig

func GetClientByCredentialName

func GetClientByCredentialName(credentialName string) *v2client.HarborAPI

Returns Harbor v2 client after resolving the credential name

func PrintPayloadInJSONFormat

func PrintPayloadInJSONFormat(payload any)

func StoreCredential

func StoreCredential(credential Credential, setAsCurrentCredential bool) error

Types

type Credential

type Credential struct {
	Name          string `yaml:"name"`
	Username      string `yaml:"username"`
	Password      string `yaml:"password"`
	ServerAddress string `yaml:"serveraddress"`
}

type CredentialStore

type CredentialStore struct {
	CurrentCredentialName string       `yaml:"current-credential-name"`
	Credentials           []Credential `yaml:"credentials"`
}

Jump to

Keyboard shortcuts

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