Documentation ¶
Overview ¶
Package schema provides access to the fleet API.
See http://github.com/coreos/fleet
Usage example:
import "google.golang.org/api/schema/v1" ... schemaService, err := schema.New(oauthHttpClient)
Index ¶
- Constants
- func MapSchemaToMachineStates(entities []*Machine) []machine.MachineState
- func MapSchemaUnitOptionsToUnitFile(sopts []*UnitOption) *unit.UnitFile
- func MapSchemaUnitStatesToUnitStates(entities []*UnitState) []*unit.UnitState
- func MapSchemaUnitToScheduledUnit(entity *Unit) *job.ScheduledUnit
- func MapSchemaUnitToUnit(entity *Unit) *job.Unit
- func MapSchemaUnitsToScheduledUnits(entities []*Unit) []job.ScheduledUnit
- func MapSchemaUnitsToUnits(entities []*Unit) []job.Unit
- type Machine
- type MachinePage
- type MachinesListCall
- type MachinesService
- type Service
- type Unit
- type UnitOption
- type UnitPage
- type UnitState
- type UnitStateListCall
- func (c *UnitStateListCall) Do() (*UnitStatePage, error)
- func (c *UnitStateListCall) Fields(s ...googleapi.Field) *UnitStateListCall
- func (c *UnitStateListCall) MachineID(machineID string) *UnitStateListCall
- func (c *UnitStateListCall) NextPageToken(nextPageToken string) *UnitStateListCall
- func (c *UnitStateListCall) UnitName(unitName string) *UnitStateListCall
- type UnitStatePage
- type UnitStateService
- type UnitsDeleteCall
- type UnitsGetCall
- type UnitsListCall
- type UnitsService
- type UnitsSetCall
Constants ¶
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 ¶ 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 MapSchemaUnitToScheduledUnit ¶ added in v0.7.0
func MapSchemaUnitToScheduledUnit(entity *Unit) *job.ScheduledUnit
func MapSchemaUnitToUnit ¶ added in v0.7.0
func MapSchemaUnitsToScheduledUnits ¶ added in v0.7.0
func MapSchemaUnitsToScheduledUnits(entities []*Unit) []job.ScheduledUnit
func MapSchemaUnitsToUnits ¶ added in v0.7.0
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 MachinesListCall ¶
type MachinesListCall struct {
// contains filtered or unexported fields
}
func (*MachinesListCall) Do ¶
func (c *MachinesListCall) Do() (*MachinePage, error)
func (*MachinesListCall) Fields ¶ added in v0.10.0
func (c *MachinesListCall) Fields(s ...googleapi.Field) *MachinesListCall
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 }
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 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 MapUnitStatesToSchemaUnitStates ¶ added in v0.7.0
type UnitStateListCall ¶ added in v0.7.0
type UnitStateListCall struct {
// contains filtered or unexported fields
}
func (*UnitStateListCall) Do ¶ added in v0.7.0
func (c *UnitStateListCall) Do() (*UnitStatePage, error)
func (*UnitStateListCall) Fields ¶ added in v0.10.0
func (c *UnitStateListCall) Fields(s ...googleapi.Field) *UnitStateListCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
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 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
func (r *UnitStateService) List() *UnitStateListCall
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 ¶ added in v0.10.0
func (c *UnitsDeleteCall) Fields(s ...googleapi.Field) *UnitsDeleteCall
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 ¶ added in v0.10.0
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 ¶ added in v0.10.0
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 ¶ added in v0.10.0
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.