verify

package
v0.0.0-...-b20ee6d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2021 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HR string = "----------------"

Functions

func Execute

func Execute(cliExec CLIExecution) (err error)

func Request

func Request(baseUrlStr, integrationAuthKey string, hyperSchema io.Reader, example io.Reader, verbose bool, expectedStatusCode int) (err error)

Types

type AuthTokenStorage

type AuthTokenStorage struct {
	Path string
}

func NewAuthTokenStorage

func NewAuthTokenStorage() (ts *AuthTokenStorage, err error)

func (*AuthTokenStorage) CreateDirectoryIfMissing

func (ats *AuthTokenStorage) CreateDirectoryIfMissing() (err error)

func (*AuthTokenStorage) GenerateIntegrationAuthToken

func (ats *AuthTokenStorage) GenerateIntegrationAuthToken() (err error)

func (*AuthTokenStorage) OverwriteIntegrationAuthKey

func (ats *AuthTokenStorage) OverwriteIntegrationAuthKey(token string) (err error)

func (*AuthTokenStorage) ReadToken

func (ats *AuthTokenStorage) ReadToken() (token string, err error)

type CLIExecution

type CLIExecution struct {
	Action       string
	SchemaPath   string
	ExamplesPath string
	BaseURL      string
	SchemaFilter string

	ApiKey             string
	IntegrationAuthKey string
	IntegrationName    string

	SchemaPathIsDir   bool
	ExamplesPathIsDir bool
	StopOnError       bool
	Verbose           bool
	CertifyActions    []string
	UseAuthKey        bool
}

type SchemaExample

type SchemaExample struct {
	SchemaPath  string
	ExamplePath string
}

type V1File

type V1File struct {
	Schema      string           `json:"$schema"`
	Links       []V1FileLink     `json:"links"`
	Definitions *json.RawMessage `json:"definitions"`
}

Outgoing request

  • Links
  • HREF/Method/Schema of outgoing data
  • TargetSchema response format (pull payload from ex file)
type V1FileLink struct {
	Description    string           `json:"description"`
	Href           string           `json:"href"`
	Method         string           `json:"method"`
	Rel            string           `json:"rel"`
	RequestSchema  *json.RawMessage `json:"schema"`
	ResponseSchema *json.RawMessage `json:"targetSchema"`
	Title          string           `json:"title"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL