model

package
v0.0.0-...-7f91efa Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2017 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

type Auth struct {
	PasswordCredentials `json:"passwordCredentials"`
	TenantID            string `json:"tenantId"`
}

type AuthReq

type AuthReq struct {
	Auth `json:"auth"`
}

func NewAuthReq

func NewAuthReq(u, p, t string) *AuthReq

type AuthRes

type AuthRes struct {
	Access struct {
		Metadata struct {
			IsAdmin int      `json:"is_admin"`
			Roles   []string `json:"roles"`
		} `json:"metadata"`
		ServiceCatalog []struct {
			Endpoints []struct {
				PublicURL string `json:"publicURL"`
				Region    string `json:"region"`
			} `json:"endpoints"`
			EndpointsLinks []interface{} `json:"endpoints_links"`
			Name           string        `json:"name"`
			Type           string        `json:"type"`
		} `json:"serviceCatalog"`
		Token struct {
			AuditIds []string  `json:"audit_ids"`
			Expires  time.Time `json:"expires"`
			ID       string    `json:"id"`
			IssuedAt string    `json:"issued_at"`
			Tenant   struct {
				Description string `json:"description"`
				DomainID    string `json:"domain_id"`
				Enabled     bool   `json:"enabled"`
				ID          string `json:"id"`
				Name        string `json:"name"`
			} `json:"tenant"`
		} `json:"token"`
		User struct {
			ID    string `json:"id"`
			Name  string `json:"name"`
			Roles []struct {
				Name string `json:"name"`
			} `json:"roles"`
			RolesLinks []interface{} `json:"roles_links"`
			Username   string        `json:"username"`
		} `json:"user"`
	} `json:"access"`
}

func (*AuthRes) GetToken

func (ar *AuthRes) GetToken() string

type Boot

type Boot struct {
	OSStart string `json:"os-start"`
}

func NewBoot

func NewBoot() *Boot

type Halt

type Halt struct {
	OSStop string `json:"os-stop"`
}

func NewHalt

func NewHalt() *Halt

type PasswordCredentials

type PasswordCredentials struct {
	Password string `json:"password"`
	UserName string `json:"username"`
}

Jump to

Keyboard shortcuts

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