client

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2020 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

View Source
const (
	XAuthUser     = "X-Auth-User"
	XAuthKey      = "X-Auth-Key"
	XAuthUserType = "X-Auth-UserType"
	XAuthToken    = "X-Auth-Token"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

type Auth interface {
	Login() error
	Logout() error
}

func NewAuth

func NewAuth(client FusionComputeClient) Auth

type FusionComputeClient

type FusionComputeClient interface {
	Connect() error
	DisConnect() error
	SetSession(token string)
	GetSession() Session
	GetHost() string
	GetUser() string
	GetPassword() string
	GetApiClient() (*resty.Client, error)
}

func NewFusionComputeClient

func NewFusionComputeClient(host string, user string, password string) FusionComputeClient

type LoginResponse

type LoginResponse struct {
	Validity     int      `json:"validity"`
	RightType    int      `json:"rightType"`
	PrivilegeIds []string `json:"privilegeIds"`
	UserId       string   `json:"userId"`
	UserName     string   `json:"userName"`
	RoleList     []string `json:"roleList"`
}

type Session

type Session string

Jump to

Keyboard shortcuts

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