client

package
v0.0.0-...-f907250 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GET    methodType = "GET"
	POST              = "POST"
	PUT               = "PUT"
	DELETE            = "DELETE"
)
View Source
const MAX_ATTEMPTS int = 12

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthService

type AuthService interface {
	Name() string
	Start() (string, error)
	WaitForExternalLogin() error
	CheckAccount(account map[string]string) (bool, error)
	Finish(pkey []byte) (models.User, string, error)
}

func GitHubAuth

func GitHubAuth(ctx context.Context) AuthService

type KeystoneClient

type KeystoneClient interface {
	InitProject(name string) (Project, error)
}

func NewKeystoneClient

func NewKeystoneClient(userID string, jwtToken string) KeystoneClient

type PublicKey

type PublicKey struct {
	Typ       string
	KeyID     string
	PublicKey string
}

type SKeystoneClient

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

func (*SKeystoneClient) AddVariable

func (client *SKeystoneClient) AddVariable(projectId string, name string, valueMap map[string]string) error

Adds a variable to all environments in a project. It encrypts it for all users assciated with the project using their publick key, and sends that to the server

func (*SKeystoneClient) GetUsersKeys

func (client *SKeystoneClient) GetUsersKeys(projectId string) ([]UserPublicKey, error)

func (*SKeystoneClient) InitProject

func (client *SKeystoneClient) InitProject(name string) (Project, error)

Initilize a project with `name` and a "default" environment

func (*SKeystoneClient) SetVariable

func (client *SKeystoneClient) SetVariable(projectId string, environment string, name string, value string) error

Updates a variable value for the specified environment. The variable must already exist. It encrypts it for all users associated with the project, and with reading rights on the environment

Jump to

Keyboard shortcuts

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