models

package
v0.0.0-...-04fe7af Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2017 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Println

func Println(p Printable, asJson bool)

Types

type Certificate

type Certificate struct {
	Ca          string `json:"ca,omitempty"`
	Certificate string `json:"certificate,omitempty"`
	PrivateKey  string `json:"private_key,omitempty"`
	CaName      string `json:"ca_name,omitempty"`
}

type CredentialBulkImport

type CredentialBulkImport struct {
	Credentials []map[string]interface{} `yaml:"credentials"`
}

func (*CredentialBulkImport) ReadBytes

func (credentialBulkImport *CredentialBulkImport) ReadBytes(data []byte) error

func (*CredentialBulkImport) ReadFile

func (credentialBulkImport *CredentialBulkImport) ReadFile(filepath string) error

type CredentialResponse

type CredentialResponse struct {
	ResponseBody map[string]interface{}
}

func (CredentialResponse) ToJson

func (response CredentialResponse) ToJson() string

func (CredentialResponse) ToYaml

func (response CredentialResponse) ToYaml() string

type GenerateRequest

type GenerateRequest struct {
	Name           string                `json:"name"`
	CredentialType string                `json:"type"`
	Overwrite      *bool                 `json:"overwrite"`
	Parameters     *GenerationParameters `json:"parameters"`
}

type GenerationParameters

type GenerationParameters struct {
	IncludeSpecial   bool     `json:"include_special,omitempty"`
	ExcludeNumber    bool     `json:"exclude_number,omitempty"`
	ExcludeUpper     bool     `json:"exclude_upper,omitempty"`
	ExcludeLower     bool     `json:"exclude_lower,omitempty"`
	Length           int      `json:"length,omitempty"`
	CommonName       string   `json:"common_name,omitempty"`
	Organization     string   `json:"organization,omitempty"`
	OrganizationUnit string   `json:"organization_unit,omitempty"`
	Locality         string   `json:"locality,omitempty"`
	State            string   `json:"state,omitempty"`
	Country          string   `json:"country,omitempty"`
	AlternativeName  []string `json:"alternative_names,omitempty"`
	ExtendedKeyUsage []string `json:"extended_key_usage,omitempty"`
	KeyUsage         []string `json:"key_usage,omitempty"`
	KeyLength        int      `json:"key_length,omitempty"`
	Duration         int      `json:"duration,omitempty"`
	Ca               string   `json:"ca,omitempty"`
	SelfSign         bool     `json:"self_sign,omitempty"`
	IsCA             bool     `json:"is_ca,omitempty"`
	SshComment       string   `json:"ssh_comment,omitempty"`
	Username         string   `json:"username,omitempty"`
}

type Info

type Info struct {
	App        infoApp    `json:"app"`
	AuthServer authServer `json:"auth-server"`
}

type Printable

type Printable interface {
	ToYaml() string
	ToJson() string
}

type RegenerateRequest

type RegenerateRequest struct {
	Name       string `json:"name"`
	Regenerate bool   `json:"regenerate"`
}

type RequestBody

type RequestBody struct {
	CredentialType   string                `json:"type" binding:"required"`
	Name             string                `json:"name,omitempty"`
	Value            interface{}           `json:"value,omitempty"`
	Overwrite        *bool                 `json:"overwrite,omitempty"`
	Parameters       *GenerationParameters `json:"parameters,omitempty"`
	VersionCreatedAt string                `json:"version_created_at,omitempty"`
}

type RsaSsh

type RsaSsh struct {
	PublicKey  string `json:"public_key,omitempty"`
	PrivateKey string `json:"private_key,omitempty"`
}

type ServerError

type ServerError struct {
	Error            string `json:"error"`
	ErrorDescription string `json:"error_description"`
}

type Token

type Token struct {
	AccessToken  string `json:"access_token"`
	RefreshToken string `json:"refresh_token"`
	TokenType    string `json:"token_type"`
	ExpiresIn    int    `json:"expires_in"`
}

func (Token) ToJson

func (t Token) ToJson() string

func (Token) ToYaml

func (t Token) ToYaml() string

type User

type User struct {
	Username string `json:"username,omitempty"`
	Password string `json:"password,omitempty"`
}

Jump to

Keyboard shortcuts

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