package lib

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

Index

Constants

const (
	// SourceFormatUnknown represents an unrecognized source format
	SourceFormatUnknown = 0
	// SourceFormatOpenAPI2 represents an OpenAPI v2 document
	SourceFormatOpenAPI2 = 2
	// SourceFormatOpenAPI3 represents an OpenAPI v3 document
	SourceFormatOpenAPI3 = 3
	// SourceFormatDiscovery represents a Google Discovery document
	SourceFormatDiscovery = 4
)

Functions

func NewUsageError

func NewUsageError(m string) error

NewUsageError returns a new usage error with the specified message.

Types

type Gnostic

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

The Gnostic structure holds global state information for gnostic.

func NewGnostic

func NewGnostic(args []string) *Gnostic

NewGnostic initializes a structure to store global application state.

func (*Gnostic) Main

func (g *Gnostic) Main() error

Main is the main program for Gnostic.

func (*Gnostic) ReadOpenAPIText

func (g *Gnostic) ReadOpenAPIText(bytes []byte) (message proto.Message, err error)

func (*Gnostic) Usage

func (g *Gnostic) Usage() string

Usage returns usage information.

type UsageError

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

UsageError is a response to invalid command-line inputs and should trigger display of usage (help) information.

func (*UsageError) Error

func (e *UsageError) Error() string

Source Files

gnostic.go

Version
v0.7.0 (latest)
Published
Aug 25, 2023
Platform
linux/amd64
Imports
21 packages
Last checked
1 week ago

Tools for package owners.