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

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

func MapMachineStateToSchema(ms *machine.MachineState) *Machine

func (*Machine) MarshalJSON added in v1.0.0

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 added in v1.0.0

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

type MachinesListCall

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

func (*MachinesListCall) Context added in v1.0.0

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

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

func (*MachinesListCall) Header added in v1.0.0

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 added in v1.0.0

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

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

func (*Unit) MarshalJSON added in v1.0.0

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

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

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

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

func (*UnitOption) MarshalJSON added in v1.0.0

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 added in v1.0.0

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

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

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

func MapUnitStateToSchemaUnitState(entity *unit.UnitState) *UnitState

func MapUnitStatesToSchemaUnitStates added in v0.7.0

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

func (*UnitState) MarshalJSON added in v1.0.0

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

type UnitStateGetCall added in v1.0.0

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

func (*UnitStateGetCall) Context added in v1.0.0

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 added in v1.0.0

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 added in v1.0.0

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

func (*UnitStateGetCall) Header added in v1.0.0

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 added in v1.0.0

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

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

func (*UnitStateListCall) Context added in v1.0.0

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

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

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

func (*UnitStateListCall) Header added in v1.0.0

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 added in v1.0.0

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

	// 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 added in v1.0.0

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

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) Get added in v1.0.0

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

Get: Retrieve a page of a single UnitState object.

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) Context added in v1.0.0

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

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

func (*UnitsDeleteCall) Header added in v1.0.0

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 added in v1.0.0

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 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.

func (*UnitsGetCall) Header added in v1.0.0

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 added in v1.0.0

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 added in v1.0.0

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 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) Header added in v1.0.0

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 added in v1.0.0

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 added in v1.0.0

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 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.

func (*UnitsSetCall) Header added in v1.0.0

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