schema

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: May 29, 2015 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package schema provides access to the fleet API.

See http://github.com/coreos/fleet

Usage example:

import "github.com/coreos/fleet/Godeps/_workspace/src/google.golang.org/api/schema/v1"
...
schemaService, err := schema.New(oauthHttpClient)

Index

Constants

View Source
const DiscoveryJSON = `` /* 6272-byte string literal not displayed */

This file is automatically generated by scripts/schema-generator

**** DO NOT EDIT ****

Variables

This section is empty.

Functions

func MapSchemaToMachineStates

func MapSchemaToMachineStates(entities []*Machine) []machine.MachineState

func MapSchemaUnitOptionsToUnitFile

func MapSchemaUnitOptionsToUnitFile(sopts []*UnitOption) *unit.UnitFile

func MapSchemaUnitStatesToUnitStates

func MapSchemaUnitStatesToUnitStates(entities []*UnitState) []*unit.UnitState

func MapSchemaUnitToScheduledUnit

func MapSchemaUnitToScheduledUnit(entity *Unit) *job.ScheduledUnit

func MapSchemaUnitToUnit

func MapSchemaUnitToUnit(entity *Unit) *job.Unit

func MapSchemaUnitsToScheduledUnits

func MapSchemaUnitsToScheduledUnits(entities []*Unit) []job.ScheduledUnit

func MapSchemaUnitsToUnits

func MapSchemaUnitsToUnits(entities []*Unit) []job.Unit

Types

type Machine

type Machine struct {
	Id string `json:"id,omitempty"`

	Metadata map[string]string `json:"metadata,omitempty"`

	PrimaryIP string `json:"primaryIP,omitempty"`
}

func MapMachineStateToSchema

func MapMachineStateToSchema(ms *machine.MachineState) *Machine

type MachinePage

type MachinePage struct {
	Machines []*Machine `json:"machines,omitempty"`

	NextPageToken string `json:"nextPageToken,omitempty"`
}

type MachinesListCall

type MachinesListCall struct {
	// contains filtered or unexported fields
}

func (*MachinesListCall) Do

func (c *MachinesListCall) Do() (*MachinePage, error)

func (*MachinesListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*MachinesListCall) NextPageToken

func (c *MachinesListCall) NextPageToken(nextPageToken string) *MachinesListCall

NextPageToken sets the optional parameter "nextPageToken":

type MachinesService

type MachinesService struct {
	// contains filtered or unexported fields
}

func NewMachinesService

func NewMachinesService(s *Service) *MachinesService

func (*MachinesService) List

func (r *MachinesService) List() *MachinesListCall

List: Retrieve a page of Machine objects.

type Service

type Service struct {
	BasePath string // API endpoint base URL

	Machines *MachinesService

	UnitState *UnitStateService

	Units *UnitsService
	// contains filtered or unexported fields
}

func New

func New(client *http.Client) (*Service, error)

type Unit

type Unit struct {
	CurrentState string `json:"currentState,omitempty"`

	DesiredState string `json:"desiredState,omitempty"`

	MachineID string `json:"machineID,omitempty"`

	Name string `json:"name,omitempty"`

	Options []*UnitOption `json:"options,omitempty"`
}

func MapUnitToSchemaUnit

func MapUnitToSchemaUnit(u *job.Unit, su *job.ScheduledUnit) *Unit

type UnitOption

type UnitOption struct {
	Name string `json:"name,omitempty"`

	Section string `json:"section,omitempty"`

	Value string `json:"value,omitempty"`
}

func MapUnitFileToSchemaUnitOptions

func MapUnitFileToSchemaUnitOptions(uf *unit.UnitFile) []*UnitOption

type UnitPage

type UnitPage struct {
	NextPageToken string `json:"nextPageToken,omitempty"`

	Units []*Unit `json:"units,omitempty"`
}

type UnitState

type UnitState struct {
	Hash string `json:"hash,omitempty"`

	MachineID string `json:"machineID,omitempty"`

	Name string `json:"name,omitempty"`

	SystemdActiveState string `json:"systemdActiveState,omitempty"`

	SystemdLoadState string `json:"systemdLoadState,omitempty"`

	SystemdSubState string `json:"systemdSubState,omitempty"`
}

func MapUnitStateToSchemaUnitState

func MapUnitStateToSchemaUnitState(entity *unit.UnitState) *UnitState

func MapUnitStatesToSchemaUnitStates

func MapUnitStatesToSchemaUnitStates(entities []*unit.UnitState) []*UnitState

type UnitStateListCall

type UnitStateListCall struct {
	// contains filtered or unexported fields
}

func (*UnitStateListCall) Do

func (*UnitStateListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*UnitStateListCall) MachineID

func (c *UnitStateListCall) MachineID(machineID string) *UnitStateListCall

MachineID sets the optional parameter "machineID":

func (*UnitStateListCall) NextPageToken

func (c *UnitStateListCall) NextPageToken(nextPageToken string) *UnitStateListCall

NextPageToken sets the optional parameter "nextPageToken":

func (*UnitStateListCall) UnitName

func (c *UnitStateListCall) UnitName(unitName string) *UnitStateListCall

UnitName sets the optional parameter "unitName":

type UnitStatePage

type UnitStatePage struct {
	NextPageToken string `json:"nextPageToken,omitempty"`

	States []*UnitState `json:"states,omitempty"`
}

type UnitStateService

type UnitStateService struct {
	// contains filtered or unexported fields
}

func NewUnitStateService

func NewUnitStateService(s *Service) *UnitStateService

func (*UnitStateService) List

List: Retrieve a page of UnitState objects.

type UnitsDeleteCall

type UnitsDeleteCall struct {
	// contains filtered or unexported fields
}

func (*UnitsDeleteCall) Do

func (c *UnitsDeleteCall) Do() error

func (*UnitsDeleteCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type UnitsGetCall

type UnitsGetCall struct {
	// contains filtered or unexported fields
}

func (*UnitsGetCall) Do

func (c *UnitsGetCall) Do() (*Unit, error)

func (*UnitsGetCall) Fields

func (c *UnitsGetCall) Fields(s ...googleapi.Field) *UnitsGetCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type UnitsListCall

type UnitsListCall struct {
	// contains filtered or unexported fields
}

func (*UnitsListCall) Do

func (c *UnitsListCall) Do() (*UnitPage, error)

func (*UnitsListCall) Fields

func (c *UnitsListCall) Fields(s ...googleapi.Field) *UnitsListCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*UnitsListCall) NextPageToken

func (c *UnitsListCall) NextPageToken(nextPageToken string) *UnitsListCall

NextPageToken sets the optional parameter "nextPageToken":

type UnitsService

type UnitsService struct {
	// contains filtered or unexported fields
}

func NewUnitsService

func NewUnitsService(s *Service) *UnitsService

func (*UnitsService) Delete

func (r *UnitsService) Delete(unitName string) *UnitsDeleteCall

Delete: Delete the referenced Unit object.

func (*UnitsService) Get

func (r *UnitsService) Get(unitName string) *UnitsGetCall

Get: Retrieve a single Unit object.

func (*UnitsService) List

func (r *UnitsService) List() *UnitsListCall

List: Retrieve a page of Unit objects.

func (*UnitsService) Set

func (r *UnitsService) Set(unitName string, unit *Unit) *UnitsSetCall

Set: Create or update a Unit.

type UnitsSetCall

type UnitsSetCall struct {
	// contains filtered or unexported fields
}

func (*UnitsSetCall) Do

func (c *UnitsSetCall) Do() error

func (*UnitsSetCall) Fields

func (c *UnitsSetCall) Fields(s ...googleapi.Field) *UnitsSetCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

Jump to

Keyboard shortcuts

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