schema

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2016 License: Apache-2.0 Imports: 17 Imported by: 0

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

View Source
const DiscoveryJSON = `` /* 6792-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"`

	// ForceSendFields is a list of field names (e.g. "Id") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Id") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

func MapMachineStateToSchema

func MapMachineStateToSchema(ms *machine.MachineState) *Machine

func (*Machine) MarshalJSON

func (s *Machine) MarshalJSON() ([]byte, error)

type MachinePage

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

	NextPageToken string `json:"nextPageToken,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "Machines") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Machines") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

func (*MachinePage) MarshalJSON

func (s *MachinePage) MarshalJSON() ([]byte, error)

type MachinesListCall

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

func (*MachinesListCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*MachinesListCall) Do

Do executes the "fleet.Machine.List" call. Exactly one of *MachinePage or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *MachinePage.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

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) Header

func (c *MachinesListCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*MachinesListCall) IfNoneMatch

func (c *MachinesListCall) IfNoneMatch(entityTag string) *MachinesListCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

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
	UserAgent string // optional additional User-Agent fragment

	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 {
	// Possible values:
	//   "inactive"
	//   "loaded"
	//   "launched"
	CurrentState string `json:"currentState,omitempty"`

	// Possible values:
	//   "inactive"
	//   "loaded"
	//   "launched"
	DesiredState string `json:"desiredState,omitempty"`

	MachineID string `json:"machineID,omitempty"`

	Name string `json:"name,omitempty"`

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

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "CurrentState") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "CurrentState") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

func MapUnitToSchemaUnit

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

func (*Unit) MarshalJSON

func (s *Unit) MarshalJSON() ([]byte, error)

type UnitOption

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

	Section string `json:"section,omitempty"`

	Value string `json:"value,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Name") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Name") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

func MapUnitFileToSchemaUnitOptions

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

func (*UnitOption) MarshalJSON

func (s *UnitOption) MarshalJSON() ([]byte, error)

type UnitPage

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

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

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "NextPageToken") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

func (*UnitPage) MarshalJSON

func (s *UnitPage) MarshalJSON() ([]byte, error)

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"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "Hash") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Hash") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

func MapUnitStateToSchemaUnitState

func MapUnitStateToSchemaUnitState(entity *unit.UnitState) *UnitState

func MapUnitStatesToSchemaUnitStates

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

func (*UnitState) MarshalJSON

func (s *UnitState) MarshalJSON() ([]byte, error)

type UnitStateGetCall

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

func (*UnitStateGetCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*UnitStateGetCall) Do

Do executes the "fleet.UnitState.Get" call. Exactly one of *UnitState or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *UnitState.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*UnitStateGetCall) Fields

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

func (*UnitStateGetCall) Header

func (c *UnitStateGetCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*UnitStateGetCall) IfNoneMatch

func (c *UnitStateGetCall) IfNoneMatch(entityTag string) *UnitStateGetCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type UnitStateListCall

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

func (*UnitStateListCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*UnitStateListCall) Do

Do executes the "fleet.UnitState.List" call. Exactly one of *UnitStatePage or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *UnitStatePage.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

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) Header

func (c *UnitStateListCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*UnitStateListCall) IfNoneMatch

func (c *UnitStateListCall) IfNoneMatch(entityTag string) *UnitStateListCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

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"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "NextPageToken") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

func (*UnitStatePage) MarshalJSON

func (s *UnitStatePage) MarshalJSON() ([]byte, error)

type UnitStateService

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

func NewUnitStateService

func NewUnitStateService(s *Service) *UnitStateService

func (*UnitStateService) Get

func (r *UnitStateService) Get(unitName string) *UnitStateGetCall

Get: Retrieve a page of a single UnitState object.

func (*UnitStateService) List

List: Retrieve a page of UnitState objects.

type UnitsDeleteCall

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

func (*UnitsDeleteCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*UnitsDeleteCall) Do

func (c *UnitsDeleteCall) Do(opts ...googleapi.CallOption) error

Do executes the "fleet.Unit.Delete" call.

func (*UnitsDeleteCall) Fields

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

func (*UnitsDeleteCall) Header

func (c *UnitsDeleteCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type UnitsGetCall

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

func (*UnitsGetCall) Context

func (c *UnitsGetCall) Context(ctx context.Context) *UnitsGetCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*UnitsGetCall) Do

func (c *UnitsGetCall) Do(opts ...googleapi.CallOption) (*Unit, error)

Do executes the "fleet.Unit.Get" call. Exactly one of *Unit or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Unit.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

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.

func (*UnitsGetCall) Header

func (c *UnitsGetCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*UnitsGetCall) IfNoneMatch

func (c *UnitsGetCall) IfNoneMatch(entityTag string) *UnitsGetCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type UnitsListCall

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

func (*UnitsListCall) Context

func (c *UnitsListCall) Context(ctx context.Context) *UnitsListCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*UnitsListCall) Do

func (c *UnitsListCall) Do(opts ...googleapi.CallOption) (*UnitPage, error)

Do executes the "fleet.Unit.List" call. Exactly one of *UnitPage or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *UnitPage.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

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) Header

func (c *UnitsListCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*UnitsListCall) IfNoneMatch

func (c *UnitsListCall) IfNoneMatch(entityTag string) *UnitsListCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

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) Context

func (c *UnitsSetCall) Context(ctx context.Context) *UnitsSetCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*UnitsSetCall) Do

func (c *UnitsSetCall) Do(opts ...googleapi.CallOption) error

Do executes the "fleet.Unit.Set" call.

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.

func (*UnitsSetCall) Header

func (c *UnitsSetCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

Jump to

Keyboard shortcuts

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