serverusage

package
v0.15.1-0...-d274060 Latest Latest
Warning

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

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

Documentation

Overview

Package serverusage provides the ability the ability to extend a server result with the extended usage information.

Example to Get an extended information:

type serverUsageExt struct {
  servers.Server
  serverusage.UsageExt
}
var serverWithUsageExt serverUsageExt

err := servers.Get(computeClient, "d650a0ce-17c3-497d-961a-43c4af80998a").ExtractInto(&serverWithUsageExt)
if err != nil {
  panic(err)
}

fmt.Printf("%+v\n", serverWithUsageExt)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UsageExt

type UsageExt struct {
	LaunchedAt   time.Time `json:"-"`
	TerminatedAt time.Time `json:"-"`
}

UsageExt represents OS-SRV-USG server response fields.

func (*UsageExt) UnmarshalJSON

func (r *UsageExt) UnmarshalJSON(b []byte) error

UnmarshalJSON helps to unmarshal UsageExt fields into needed values.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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