Documentation ¶
Index ¶
- Constants
- Variables
- func FetchDocumentBytes(documentURL string) ([]byte, error)
- func FetchListBytes() ([]byte, error)
- func Version() string
- type API
- type Annotations
- type Any
- type Auth
- type Document
- type Icons
- type List
- type MediaUpload
- type Method
- type Methods
- type NamedMethod
- type NamedParameter
- type NamedResource
- type NamedSchema
- type NamedScope
- type Oauth2
- type Parameter
- type Parameters
- type Protocols
- type Request
- type Resource
- type Resources
- type Response
- type Resumable
- type Schema
- type Schemas
- type Scope
- type Scopes
- type Simple
- type StringArray
Constants ¶
const APIsListServiceURL = "https://www.googleapis.com/discovery/v1/apis"
APIsListServiceURL is the URL for the Google APIs Discovery Service
Variables ¶
var File_discovery_discovery_proto = discovery.File_discovery_discovery_proto
Functions ¶
func FetchDocumentBytes ¶
FetchDocumentBytes downloads the bytes of a discovery document from a URL.
func FetchListBytes ¶
Types ¶
type API ¶
type API struct { Kind string `json:"kind"` ID string `json:"id"` Name string `json:"name"` Version string `json:"version"` Title string `json:"title"` Description string `json:"description"` DiscoveryRestURL string `json:"discoveryRestUrl"` DiscoveryLink string `json:"discoveryLink"` Icons map[string]string `json:"icons"` DocumentationLink string `json:"documentationLink"` Labels []string `json:"labels"` Preferred bool `json:"preferred"` }
An API represents an API description returned by the apis/list API.
type Annotations ¶
type Annotations = discovery.Annotations
func NewAnnotations ¶
func NewAnnotations(in *yaml.Node, context *compiler.Context) (*Annotations, error)
NewAnnotations creates an object of type Annotations if possible, returning an error if not.
type Document ¶
func NewDocument ¶
NewDocument creates an object of type Document if possible, returning an error if not.
func ParseDocument ¶
ParseDocument reads a Discovery description from a YAML/JSON representation.
type List ¶
type List struct { Kind string `json:"kind"` DiscoveryVersion string `json:"discoveryVersion"` APIs []*API `json:"items"` }
A List represents the results of a call to the apis/list API. https://developers.google.com/discovery/v1/reference/apis/list
type MediaUpload ¶
type MediaUpload = discovery.MediaUpload
func NewMediaUpload ¶
func NewMediaUpload(in *yaml.Node, context *compiler.Context) (*MediaUpload, error)
NewMediaUpload creates an object of type MediaUpload if possible, returning an error if not.
type NamedMethod ¶
type NamedMethod = discovery.NamedMethod
func NewNamedMethod ¶
func NewNamedMethod(in *yaml.Node, context *compiler.Context) (*NamedMethod, error)
NewNamedMethod creates an object of type NamedMethod if possible, returning an error if not.
type NamedParameter ¶
type NamedParameter = discovery.NamedParameter
func NewNamedParameter ¶
func NewNamedParameter(in *yaml.Node, context *compiler.Context) (*NamedParameter, error)
NewNamedParameter creates an object of type NamedParameter if possible, returning an error if not.
type NamedResource ¶
type NamedResource = discovery.NamedResource
func NewNamedResource ¶
func NewNamedResource(in *yaml.Node, context *compiler.Context) (*NamedResource, error)
NewNamedResource creates an object of type NamedResource if possible, returning an error if not.
type NamedSchema ¶
type NamedSchema = discovery.NamedSchema
func NewNamedSchema ¶
func NewNamedSchema(in *yaml.Node, context *compiler.Context) (*NamedSchema, error)
NewNamedSchema creates an object of type NamedSchema if possible, returning an error if not.
type NamedScope ¶
type NamedScope = discovery.NamedScope
func NewNamedScope ¶
func NewNamedScope(in *yaml.Node, context *compiler.Context) (*NamedScope, error)
NewNamedScope creates an object of type NamedScope if possible, returning an error if not.
type Parameters ¶
type Parameters = discovery.Parameters
func NewParameters ¶
func NewParameters(in *yaml.Node, context *compiler.Context) (*Parameters, error)
NewParameters creates an object of type Parameters if possible, returning an error if not.
type StringArray ¶
type StringArray = discovery.StringArray
func NewStringArray ¶
func NewStringArray(in *yaml.Node, context *compiler.Context) (*StringArray, error)
NewStringArray creates an object of type StringArray if possible, returning an error if not.