internal

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init()

func Open

func Open(url string) bool

Types

type Workflow

type Workflow struct {
	*aw.Workflow
}
var Default *Workflow

func (*Workflow) AddYapiConfig

func (r *Workflow) AddYapiConfig(host, token string) error

func (*Workflow) GetYapiConfigList

func (r *Workflow) GetYapiConfigList() ([]*YapiConfig, error)

func (*Workflow) Input

func (r *Workflow) Input() string

func (*Workflow) InputWithPre

func (r *Workflow) InputWithPre() (string, string)

func (*Workflow) Run

func (r *Workflow) Run(handler func() error)

func (*Workflow) Search

func (r *Workflow) Search(s string) ([]*YapiInterface, error)

type YapiConfig

type YapiConfig struct {
	ID    int    `json:"id"`
	Name  string `json:"name"`
	Host  string `json:"host"`
	Token string `json:"token"`
}

func (*YapiConfig) Project

func (r *YapiConfig) Project() (*YapiProject, error)

func (*YapiConfig) Search

func (r *YapiConfig) Search(s string) ([]*YapiInterface, error)

type YapiInterface

type YapiInterface struct {
	Host      string        `json:"host"`
	EditUID   int           `json:"edit_uid"`
	Status    string        `json:"status"`
	APIOpened bool          `json:"api_opened"`
	Tag       []interface{} `json:"tag"`
	ID        int           `json:"_id"`
	Method    string        `json:"method"`
	Catid     int           `json:"catid"`
	Title     string        `json:"title"`
	Path      string        `json:"path"`
	ProjectID int           `json:"project_id"`
	UID       int           `json:"uid"`
	AddTime   int           `json:"add_time"`
	UpTime    int           `json:"up_time"`
}

type YapiProject

type YapiProject struct {
	SwitchNotice bool   `json:"switch_notice"`
	IsMockOpen   bool   `json:"is_mock_open"`
	Strice       bool   `json:"strice"`
	IsJSON5      bool   `json:"is_json5"`
	ID           int    `json:"_id"`
	Name         string `json:"name"`
	Basepath     string `json:"basepath"`
	ProjectType  string `json:"project_type"`
	UID          int    `json:"uid"`
	GroupID      int    `json:"group_id"`
	Icon         string `json:"icon"`
	Color        string `json:"color"`
	Psm          string `json:"psm"`
	AddTime      int    `json:"add_time"`
	UpTime       int    `json:"up_time"`
	Env          []struct {
		Header []interface{} `json:"header"`
		Global []interface{} `json:"global"`
		ID     string        `json:"_id"`
		Name   string        `json:"name"`
		Domain string        `json:"domain"`
	} `json:"env"`
	Tag  []interface{} `json:"tag"`
	Cat  []interface{} `json:"cat"`
	Role bool          `json:"role"`
}

Jump to

Keyboard shortcuts

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