Documentation
¶
Overview ¶
Copyright 2017 Google Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- func GenServiceClient(discoveryRestURL string, path string) error
- func GetFiles(apiBytes []byte, path string) error
- func OpenAPIv3(api *discovery.Document) (*openapi3.Document, error)
- type API
- type List
- type ServiceRenderer
- func (s *ServiceRenderer) RenderAll() error
- func (s *ServiceRenderer) RenderClient(filename string) error
- func (s *ServiceRenderer) RenderConstants(filename string) error
- func (s *ServiceRenderer) RenderModel(filename string) error
- func (s *ServiceRenderer) RenderProvider(filename string) error
- func (s *ServiceRenderer) RenderServer(filename string) error
- func (s *ServiceRenderer) RenderTypes(filename string) error
Constants ¶
const APIsListServiceURL = "https://www.googleapis.com/discovery/v1/apis"
APIsListServiceURL is the URL for the Google APIs Discovery Service
Variables ¶
This section is empty.
Functions ¶
func GenServiceClient ¶
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 the an API description returned by the apis/list API.
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 ListServices ¶
type ServiceRenderer ¶
type ServiceRenderer struct {
// contains filtered or unexported fields
}
func NewServiceRenderer ¶
func NewServiceRenderer(discoveryRestURL string, packageName string, output string) (*ServiceRenderer, error)
func (*ServiceRenderer) RenderAll ¶
func (s *ServiceRenderer) RenderAll() error
func (*ServiceRenderer) RenderClient ¶
func (s *ServiceRenderer) RenderClient(filename string) error
func (*ServiceRenderer) RenderConstants ¶
func (s *ServiceRenderer) RenderConstants(filename string) error
func (*ServiceRenderer) RenderModel ¶
func (s *ServiceRenderer) RenderModel(filename string) error
func (*ServiceRenderer) RenderProvider ¶
func (s *ServiceRenderer) RenderProvider(filename string) error
func (*ServiceRenderer) RenderServer ¶
func (s *ServiceRenderer) RenderServer(filename string) error
func (*ServiceRenderer) RenderTypes ¶
func (s *ServiceRenderer) RenderTypes(filename string) error