schema

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2014 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/code.google.com/p/google-api-go-client/schema/v1-alpha"
...
schemaService, err := schema.New(oauthHttpClient)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MapSchemaToMachineStates added in v0.7.0

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

func MapSchemaUnitOptionsToUnitFile added in v0.7.0

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

func MapSchemaUnitStatesToUnitStates added in v0.7.0

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

func MapSchemaUnitToScheduledUnit added in v0.7.0

func MapSchemaUnitToScheduledUnit(entity *Unit) *job.ScheduledUnit

func MapSchemaUnitToUnit added in v0.7.0

func MapSchemaUnitToUnit(entity *Unit) *job.Unit

func MapSchemaUnitsToScheduledUnits added in v0.7.0

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

func MapSchemaUnitsToUnits added in v0.7.0

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 added in v0.7.0

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) 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 added in v0.7.0

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

type UnitOption added in v0.7.0

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

	Section string `json:"section,omitempty"`

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

func MapUnitFileToSchemaUnitOptions added in v0.7.0

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

type UnitPage

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

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

type UnitState added in v0.7.0

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 added in v0.7.0

func MapUnitStateToSchemaUnitState(entity *unit.UnitState) *UnitState

func MapUnitStatesToSchemaUnitStates added in v0.7.0

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

type UnitStateListCall added in v0.7.0

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

func (*UnitStateListCall) Do added in v0.7.0

func (*UnitStateListCall) MachineID added in v0.7.0

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

MachineID sets the optional parameter "machineID":

func (*UnitStateListCall) NextPageToken added in v0.7.0

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

NextPageToken sets the optional parameter "nextPageToken":

func (*UnitStateListCall) UnitName added in v0.7.0

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

UnitName sets the optional parameter "unitName":

type UnitStatePage added in v0.7.0

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

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

type UnitStateService added in v0.7.0

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

func NewUnitStateService added in v0.7.0

func NewUnitStateService(s *Service) *UnitStateService

func (*UnitStateService) List added in v0.7.0

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

type UnitsGetCall

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

func (*UnitsGetCall) Do

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

type UnitsListCall

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

func (*UnitsListCall) Do

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

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

Jump to

Keyboard shortcuts

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