thrift

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2023 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Form

type Form struct {
	ID                 string    `json:"id"`
	Address            string    `json:"address"`
	Headers            []*Header `json:"headers"`
	SelectedFunctionID string    `json:"selectedFunctionID"`
	IsMultiplexed      bool      `json:"isMultiplexed"`
	Request            string    `json:"request"`
	Response           string    `json:"response"`
	// contains filtered or unexported fields
}

func (*Form) Close

func (f *Form) Close() error

func (*Form) SendRequest

func (f *Form) SendRequest(
	functionID,
	address,
	payload string,
	isMultiplexed bool,
	headers []*Header,
) (string, error)

nolint: funlen

func (*Form) StopCurrentRequest

func (f *Form) StopCurrentRequest()
type Header struct {
	ID    string `json:"id"`
	Key   string `json:"key"`
	Value string `json:"value"`
}

type Module

type Module struct {
	AppCtx context.Context
	// contains filtered or unexported fields
}

func NewModule

func NewModule(stateStorage *state.Storage) (*Module, error)

func (*Module) AddHeader

func (m *Module) AddHeader(projectID, formID string) (*Project, error)

func (*Module) BeautifyRequest

func (m *Module) BeautifyRequest(projectID, formID string) (*Project, error)

func (*Module) CreateNewForm

func (m *Module) CreateNewForm(projectID string) (*Project, error)

func (*Module) CreateNewProject

func (m *Module) CreateNewProject(projectID string) (*Project, error)

func (*Module) DeleteHeader

func (m *Module) DeleteHeader(projectID, formID, headerID string) (*Project, error)

func (*Module) DeleteProject

func (m *Module) DeleteProject(projectID string) error

func (*Module) OpenFilePath

func (m *Module) OpenFilePath(projectID string) (*Project, error)

func (*Module) Project

func (m *Module) Project(projectID string) (*Project, error)

func (*Module) RemoveForm

func (m *Module) RemoveForm(projectID, formID string) (*Project, error)

func (*Module) SaveAddress

func (m *Module) SaveAddress(projectID, formID, address string) (*Project, error)

func (*Module) SaveCurrentFormID

func (m *Module) SaveCurrentFormID(projectID, currentFormID string) (*Project, error)

func (*Module) SaveHeaders

func (m *Module) SaveHeaders(projectID, formID string, headers []*Header) (*Project, error)

func (*Module) SaveIsMultiplexed

func (m *Module) SaveIsMultiplexed(projectID, formID string, isMultiplexed bool) (*Project, error)

func (*Module) SaveRequestPayload

func (m *Module) SaveRequestPayload(projectID, formID, requestPayload string) (*Project, error)

func (*Module) SaveSplitterWidth

func (m *Module) SaveSplitterWidth(projectID string, splitterWidth float64) (*Project, error)

func (*Module) SelectFunction

func (m *Module) SelectFunction(projectID, formID, functionID string) (*Project, error)

func (*Module) SendRequest

func (m *Module) SendRequest(projectID, formID string, address, payload string) (*Project, error)

func (*Module) StopRequest

func (m *Module) StopRequest(projectID, formID string) (*Project, error)

type Project

type Project struct {
	ID            string             `json:"id"`
	SplitterWidth float64            `json:"splitterWidth"`
	Forms         map[string]*Form   `json:"forms"`
	FormIDs       []string           `json:"formIDs"`
	CurrentFormID string             `json:"currentFormID"`
	FilePath      string             `json:"filePath"`
	Nodes         []*ServiceTreeNode `json:"nodes"`
	// contains filtered or unexported fields
}

func NewProject

func NewProject(projectID string, stateStorage *state.Storage) (*Project, error)

func (*Project) AddHeader

func (p *Project) AddHeader(formID string) error

func (*Project) BeautifyRequest

func (p *Project) BeautifyRequest(formID string) error

func (*Project) Close

func (p *Project) Close() error

func (*Project) CreateNewForm

func (p *Project) CreateNewForm() error

func (*Project) DeleteHeader

func (p *Project) DeleteHeader(formID, headerID string) error

func (*Project) GenerateServiceTreeNodes

func (p *Project) GenerateServiceTreeNodes(filePath string) ([]*ServiceTreeNode, error)

func (*Project) OpenFilePath

func (p *Project) OpenFilePath(filePath string) error

func (*Project) RemoveForm

func (p *Project) RemoveForm(formID string) error

func (*Project) SaveAddress

func (p *Project) SaveAddress(formID, address string) error

func (*Project) SaveCurrentFormID

func (p *Project) SaveCurrentFormID(currentFormID string) error

func (*Project) SaveHeaders

func (p *Project) SaveHeaders(formID string, headers []*Header) error

func (*Project) SaveIsMultiplexed

func (p *Project) SaveIsMultiplexed(formID string, isMultiplexed bool) error

func (*Project) SaveRequestPayload

func (p *Project) SaveRequestPayload(formID, requestPayload string) error

func (*Project) SaveSplitterWidth

func (p *Project) SaveSplitterWidth(splitterWidth float64) error

func (*Project) SelectFunction

func (p *Project) SelectFunction(formID, functionID string) error

func (*Project) SendRequest

func (p *Project) SendRequest(
	formID,
	address,
	payload string,
) error

func (*Project) StopRequest

func (p *Project) StopRequest(formID string)

type ServiceTree

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

func NewServiceTree

func NewServiceTree(module *compile.Module) (*ServiceTree, error)

func (*ServiceTree) Function

func (t *ServiceTree) Function(id string) *ServiceTreeFunction

func (*ServiceTree) Nodes

func (t *ServiceTree) Nodes() []*ServiceTreeNode

type ServiceTreeFunction

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

func (*ServiceTreeFunction) ServiceName

func (f *ServiceTreeFunction) ServiceName() string

func (*ServiceTreeFunction) Spec

type ServiceTreeNode

type ServiceTreeNode struct {
	ID         string             `json:"id"`
	Label      string             `json:"label"`
	Selectable bool               `json:"selectable"`
	Children   []*ServiceTreeNode `json:"children"`
}

type ServiceTreeService

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

Jump to

Keyboard shortcuts

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