cps

package
v0.0.0-...-ed5f25b Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckinPasswordForAccount

func CheckinPasswordForAccount(client *restapi.RestClient, id string) error

Checks in the password for the specified account

func CheckoutPasswordForAccount

func CheckoutPasswordForAccount(client *restapi.RestClient, id string) (string, error)

Checks out the password for the specified account and returns password

func CreateAccount

func CreateAccount(client *restapi.RestClient, systemID string, name string, password string, managed bool, description string) (string, error)

Creates a new account with the given name/value, returns ID or error

func CreateSecret

func CreateSecret(client *restapi.RestClient, name string, secret string) (string, error)

Creates a new secret with the given name/value, returns ID or error

func CreateSecretWithDescription

func CreateSecretWithDescription(client *restapi.RestClient, name string, secret string, desc string) (string, error)

Creates a new secret with the given name/value, returns ID or error

func CreateSystem

func CreateSystem(client *restapi.RestClient, name string, description string, class string, fqdn string) (string, error)

Creates a new system with the given name/value, returns ID or error

func DeleteAccount

func DeleteAccount(client *restapi.RestClient, id string) error

Deletes the specified account by ID

func DeleteSecret

func DeleteSecret(client *restapi.RestClient, id string) error

Deletes the specified secret by ID

func DeleteSystem

func DeleteSystem(client *restapi.RestClient, id string) error

Deletes the specified system by ID

func GetAccountsForSystem

func GetAccountsForSystem(client *restapi.RestClient, systemID string) (map[string]*Account, error)

Get all accounts associated with a specific system

func GetSecretList

func GetSecretList(client *restapi.RestClient, includeSecrets bool) (map[string]*Secret, error)

func GetSystemList

func GetSystemList(client *restapi.RestClient) (map[string]*System, error)

GetSystemList Gets a list of CPS Systems via RR query

func UpdateAccount

func UpdateAccount(client *restapi.RestClient, account Account) (string, error)

Updates an existing account with the given name/value, returns ID or error

func UpdateSecret

func UpdateSecret(client *restapi.RestClient, secret Secret, value string) error

Updates a secret with the given value

func UpdateSystem

func UpdateSystem(client *restapi.RestClient, system System) error

Updates a system with the given value

Types

type Account

type Account struct {
	Name        string
	ID          string
	SystemID    string
	Description string
	Password    string
	Status      string
	Managed     bool
}

Encapsulates a single CPS Account

type Secret

type Secret struct {
	Name        string
	ID          string
	SecretText  string
	Description string
}

Encapsulates a single Generic Secret (text only atm)

func ReadSecret

func ReadSecret(client *restapi.RestClient, id string) (*Secret, error)

Reads a secret, including value

type System

type System struct {
	Name         string
	ID           string
	Class        string
	HealthStatus string
	FQDN         string
	Description  string
}

Encapsulates a single System/server

Jump to

Keyboard shortcuts

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