package discovery_v1
import "github.com/google/gnostic/discovery"
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
- func NewDocument(in *yaml.Node, context *compiler.Context) (*Document, error)
- func ParseDocument(b []byte) (*Document, error)
- type Icons
- type List
- func FetchList() (*List, error)
- func ParseList(bytes []byte) (*List, error)
- func (a *List) APIWithNameAndVersion(name string, version string) (*API, error)
- 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 ¶
func Version ¶
func Version() string
Version returns the package name (and OpenAPI version).
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 Any ¶
func NewAny ¶
NewAny creates an object of type Any if possible, returning an error if not.
type Auth ¶
func NewAuth ¶
NewAuth creates an object of type Auth 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 Icons ¶
func NewIcons ¶
NewIcons creates an object of type Icons if possible, returning an error if not.
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
func FetchList ¶
Read the list of APIs from the apis/list service.
func ParseList ¶
ParseList unmarshals the bytes into a Document.
func (*List) APIWithNameAndVersion ¶
APIWithNameAndVersion returns the API with a specified name and version. If version is the empty string, the API name must be unique.
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 Method ¶
func NewMethod ¶
NewMethod creates an object of type Method if possible, returning an error if not.
type Methods ¶
func NewMethods ¶
NewMethods creates an object of type Methods 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 Oauth2 ¶
func NewOauth2 ¶
NewOauth2 creates an object of type Oauth2 if possible, returning an error if not.
type Parameter ¶
func NewParameter ¶
NewParameter creates an object of type Parameter 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 Protocols ¶
func NewProtocols ¶
NewProtocols creates an object of type Protocols if possible, returning an error if not.
type Request ¶
func NewRequest ¶
NewRequest creates an object of type Request if possible, returning an error if not.
type Resource ¶
func NewResource ¶
NewResource creates an object of type Resource if possible, returning an error if not.
type Resources ¶
func NewResources ¶
NewResources creates an object of type Resources if possible, returning an error if not.
type Response ¶
func NewResponse ¶
NewResponse creates an object of type Response if possible, returning an error if not.
type Resumable ¶
func NewResumable ¶
NewResumable creates an object of type Resumable if possible, returning an error if not.
type Schema ¶
func NewSchema ¶
NewSchema creates an object of type Schema if possible, returning an error if not.
type Schemas ¶
func NewSchemas ¶
NewSchemas creates an object of type Schemas if possible, returning an error if not.
type Scope ¶
func NewScope ¶
NewScope creates an object of type Scope if possible, returning an error if not.
type Scopes ¶
func NewScopes ¶
NewScopes creates an object of type Scopes if possible, returning an error if not.
type Simple ¶
func NewSimple ¶
NewSimple creates an object of type Simple 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.
Source Files ¶
discovery.go discovery.pbalias.go document.go list.go
- Version
- v0.7.0 (latest)
- Published
- Aug 25, 2023
- Platform
- linux/amd64
- Imports
- 8 packages
- Last checked
- 1 day ago –
Tools for package owners.