package discovery_v1

import "github.com/google/gnostic/discovery"

Index

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

func FetchDocumentBytes(documentURL string) ([]byte, error)

FetchDocumentBytes downloads the bytes of a discovery document from a URL.

func FetchListBytes

func FetchListBytes() ([]byte, error)

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

type Any = discovery.Any

func NewAny

func NewAny(in *yaml.Node, context *compiler.Context) (*Any, error)

NewAny creates an object of type Any if possible, returning an error if not.

type Auth

type Auth = discovery.Auth

func NewAuth

func NewAuth(in *yaml.Node, context *compiler.Context) (*Auth, error)

NewAuth creates an object of type Auth if possible, returning an error if not.

type Document

type Document = discovery.Document

func NewDocument

func NewDocument(in *yaml.Node, context *compiler.Context) (*Document, error)

NewDocument creates an object of type Document if possible, returning an error if not.

func ParseDocument

func ParseDocument(b []byte) (*Document, error)

ParseDocument reads a Discovery description from a YAML/JSON representation.

type Icons

type Icons = discovery.Icons

func NewIcons

func NewIcons(in *yaml.Node, context *compiler.Context) (*Icons, error)

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

func FetchList() (*List, error)

Read the list of APIs from the apis/list service.

func ParseList

func ParseList(bytes []byte) (*List, error)

ParseList unmarshals the bytes into a Document.

func (*List) APIWithNameAndVersion

func (a *List) APIWithNameAndVersion(name string, version string) (*API, error)

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

type Method = discovery.Method

func NewMethod

func NewMethod(in *yaml.Node, context *compiler.Context) (*Method, error)

NewMethod creates an object of type Method if possible, returning an error if not.

type Methods

type Methods = discovery.Methods

func NewMethods

func NewMethods(in *yaml.Node, context *compiler.Context) (*Methods, error)

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

type Oauth2 = discovery.Oauth2

func NewOauth2

func NewOauth2(in *yaml.Node, context *compiler.Context) (*Oauth2, error)

NewOauth2 creates an object of type Oauth2 if possible, returning an error if not.

type Parameter

type Parameter = discovery.Parameter

func NewParameter

func NewParameter(in *yaml.Node, context *compiler.Context) (*Parameter, error)

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

type Protocols = discovery.Protocols

func NewProtocols

func NewProtocols(in *yaml.Node, context *compiler.Context) (*Protocols, error)

NewProtocols creates an object of type Protocols if possible, returning an error if not.

type Request

type Request = discovery.Request

func NewRequest

func NewRequest(in *yaml.Node, context *compiler.Context) (*Request, error)

NewRequest creates an object of type Request if possible, returning an error if not.

type Resource

type Resource = discovery.Resource

func NewResource

func NewResource(in *yaml.Node, context *compiler.Context) (*Resource, error)

NewResource creates an object of type Resource if possible, returning an error if not.

type Resources

type Resources = discovery.Resources

func NewResources

func NewResources(in *yaml.Node, context *compiler.Context) (*Resources, error)

NewResources creates an object of type Resources if possible, returning an error if not.

type Response

type Response = discovery.Response

func NewResponse

func NewResponse(in *yaml.Node, context *compiler.Context) (*Response, error)

NewResponse creates an object of type Response if possible, returning an error if not.

type Resumable

type Resumable = discovery.Resumable

func NewResumable

func NewResumable(in *yaml.Node, context *compiler.Context) (*Resumable, error)

NewResumable creates an object of type Resumable if possible, returning an error if not.

type Schema

type Schema = discovery.Schema

func NewSchema

func NewSchema(in *yaml.Node, context *compiler.Context) (*Schema, error)

NewSchema creates an object of type Schema if possible, returning an error if not.

type Schemas

type Schemas = discovery.Schemas

func NewSchemas

func NewSchemas(in *yaml.Node, context *compiler.Context) (*Schemas, error)

NewSchemas creates an object of type Schemas if possible, returning an error if not.

type Scope

type Scope = discovery.Scope

func NewScope

func NewScope(in *yaml.Node, context *compiler.Context) (*Scope, error)

NewScope creates an object of type Scope if possible, returning an error if not.

type Scopes

type Scopes = discovery.Scopes

func NewScopes

func NewScopes(in *yaml.Node, context *compiler.Context) (*Scopes, error)

NewScopes creates an object of type Scopes if possible, returning an error if not.

type Simple

type Simple = discovery.Simple

func NewSimple

func NewSimple(in *yaml.Node, context *compiler.Context) (*Simple, error)

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.