core

package
v0.0.0-...-5d46da9 Latest Latest
Warning

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

Go to latest
Published: May 19, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PostmanCollectionName = "postman_collection.json"
	BrunoCollectionName   = "bruno_collection.tar"
)

Variables

This section is empty.

Functions

func RenderFeatureDescription

func RenderFeatureDescription(feature *Feature, collectionType CollectionType) string

Types

type CollectionType

type CollectionType uint
const (
	OpenAPI CollectionType = iota
	Postman
	Bruno
)

func (CollectionType) String

func (collectionType CollectionType) String() string

type Entity

type Entity struct {
	Name        string
	Description string
	Version     string
	Url         string
}

type ExampleModelValueGenerator

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

func NewExampleModelValueGenerator

func NewExampleModelValueGenerator(pages []Page) *ExampleModelValueGenerator

func (*ExampleModelValueGenerator) Get

func (generator *ExampleModelValueGenerator) Get(modelName string) (interface{}, bool)

type Feature

type Feature struct {
	Name             string
	Description      string
	MainEntities     []Entity
	AuxiliaryEntites []Entity
}

func (*Feature) AllEntities

func (feature *Feature) AllEntities() []Entity

type Field

type Field struct {
	Name       string
	Tooltip    string
	Type       Type
	IsRequired bool
	TypeName   string
	// only for array
	ElementType  string
	Length       int64
	Description  string
	IsDeprecated bool
}

type HomePage

type HomePage struct {
	DocsUrl  string
	Features []Feature
}

type Method

type Method struct {
	Name        string
	Description string
	// Model name
	Parameter string
	// model name
	Return       string
	Example      map[string]interface{}
	IsDeprecated bool
}

type Model

type Model struct {
	Name   string
	Fields []Field
}

type Page

type Page struct {
	EntityName string
	Name       string
	DocsUrl    string
	Endpoint   string
	BaseUrl    string
	FullUrl    string
	BasePath   string
	ApiVersion string
	Methods    []Method
	Models     []Model
}

type Type

type Type int
const (
	String Type = iota
	Integer
	Text
	Decimal
	Boolean
	Object
	Array
)

Jump to

Keyboard shortcuts

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