Documentation ¶
Index ¶
- type CallOptions
- type OsClient
- type OsResponse
- func (r *OsResponse) GetBody() ([]byte, error)
- func (r *OsResponse) GetBodyAsString() (string, error)
- func (r *OsResponse) GetHeader(header string) string
- func (r *OsResponse) GetHeaderAsBool(header string) bool
- func (r *OsResponse) GetHeaderAsTime(header string) (t *time.Time)
- func (r *OsResponse) GetheaderAsInt(header string) int
- func (r *OsResponse) GetheaderAsInt64(header string) int64
- func (r *OsResponse) GetheaderAsUint64(header string) uint64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CallOptions ¶
type CallOptions struct { Method string Endpoint string Ressource string ExpectedCodes []int Headers map[string]string Payload io.Reader }
CallOptions reprsents options for the Call func
type OsClient ¶
OsClient represents an openstack API client
func (*OsClient) Call ¶
func (c *OsClient) Call(options *CallOptions) (response OsResponse, err error)
Call calls on openstack API ressource
type OsResponse ¶
OsResponse represent a openstack API response
func (*OsResponse) GetBody ¶
func (r *OsResponse) GetBody() ([]byte, error)
GetBody returns response body as slive of bytes
func (*OsResponse) GetBodyAsString ¶
func (r *OsResponse) GetBodyAsString() (string, error)
GetBodyAsString return body as string
func (*OsResponse) GetHeader ¶
func (r *OsResponse) GetHeader(header string) string
GetHeader return header value as string
func (*OsResponse) GetHeaderAsBool ¶
func (r *OsResponse) GetHeaderAsBool(header string) bool
GetHeaderAsBool retuns header as boolean
func (*OsResponse) GetHeaderAsTime ¶
func (r *OsResponse) GetHeaderAsTime(header string) (t *time.Time)
GetHeaderAsTime return header value as time.Time (1434366136.09226)
func (*OsResponse) GetheaderAsInt ¶
func (r *OsResponse) GetheaderAsInt(header string) int
GetheaderAsInt returns int value of header, or nil
func (*OsResponse) GetheaderAsInt64 ¶
func (r *OsResponse) GetheaderAsInt64(header string) int64
GetheaderAsInt64 returns int value of header or 0
func (*OsResponse) GetheaderAsUint64 ¶
func (r *OsResponse) GetheaderAsUint64(header string) uint64
GetheaderAsUint64 returns int value of header or 0
Click to show internal directories.
Click to hide internal directories.