accesstoken

package
v0.0.44 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const KeyringServiceName = "kam"

KeyringServiceName refers to service name used to set the accesstoken in the keyring

Variables

This section is empty.

Functions

func GetAccessToken

func GetAccessToken(gitRepoURL string) (string, error)

GetAccessToken returns the token from either that is stored in the keyring or the environment variable in this order.

func GetEnvVarName

func GetEnvVarName(hostName string) string

GetEnvVarName contains the logic for the naming convention of the environment variable that contains the accesstoken

func HostFromURL

func HostFromURL(s string) (string, error)

HostFromURL extracts the hostname from the url passed

func SetAccessToken

func SetAccessToken(repoURL, accessToken string) error

SetSecret sets the secret in the keyring

Types

This section is empty.

Jump to

Keyboard shortcuts

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