Documentation ¶
Index ¶
- Constants
- type Container
- type Controller
- type GrpcContainer
- type RestContainer
- type View
- func (v *View) AddChildTreeViewNode(parentID string, req *domain.Request)
- func (v *View) AddCollectionTreeViewNode(collection *domain.Collection)
- func (v *View) AddFileToFormData(requestId, fieldId, filePath string)
- func (v *View) AddRequestTreeViewNode(req *domain.Request)
- func (v *View) AddTreeViewNode(req *domain.Request)
- func (v *View) CloseTab(id string)
- func (v *View) ExpandTreeViewNode(id string)
- func (v *View) GetHTTPResponse(id string) *domain.HTTPResponseDetail
- func (v *View) GetTabType(id string) string
- func (v *View) GetTreeViewNodeType(id string) string
- func (v *View) HidePrompt(id string)
- func (v *View) IsTabOpen(id string) bool
- func (v *View) Layout(gtx layout.Context, theme *chapartheme.Theme) layout.Dimensions
- func (v *View) OpenCollectionContainer(collection *domain.Collection)
- func (v *View) OpenRequestContainer(req *domain.Request)
- func (v *View) OpenTab(id, name, tabType string)
- func (v *View) PopulateTreeView(requests []*domain.Request, collections []*domain.Collection)
- func (v *View) RemoveTreeViewNode(id string)
- func (v *View) SetBinaryBodyFilePath(id, filePath string)
- func (v *View) SetGRPCMethodsLoading(id string, loading bool)
- func (v *View) SetGRPCResponse(id string, response domain.GRPCResponseDetail)
- func (v *View) SetGRPCServices(id string, services []domain.GRPCService)
- func (v *View) SetHTTPResponse(id string, response domain.HTTPResponseDetail)
- func (v *View) SetOnBinaryFileSelect(f func(id string))
- func (v *View) SetOnCopyResponse(onCopyResponse func(gtx layout.Context, dataType, data string))
- func (v *View) SetOnDataChanged(onDataChanged func(id string, data any, containerType string))
- func (v *View) SetOnFormDataFileSelect(f func(requestId, fieldId string))
- func (v *View) SetOnGrpcInvoke(f func(id string))
- func (v *View) SetOnGrpcLoadRequestExample(f func(id string))
- func (v *View) SetOnImport(f func())
- func (v *View) SetOnNewCollection(onNewCollection func())
- func (v *View) SetOnNewRequest(onNewRequest func(requestType string))
- func (v *View) SetOnPostRequestSetChanged(f func(id string, statusCode int, item, from, fromKey string))
- func (v *View) SetOnProtoFileSelect(f func(id string))
- func (v *View) SetOnSave(onSave func(id string))
- func (v *View) SetOnServerInfoReload(f func(id string))
- func (v *View) SetOnSubmit(f func(id, containerType string))
- func (v *View) SetOnTabClose(onTabClose func(id string))
- func (v *View) SetOnTabSelected(onTabSelected func(id string))
- func (v *View) SetOnTitleChanged(onTitleChanged func(id, title, containerType string))
- func (v *View) SetOnTreeViewMenuClicked(onTreeViewMenuClicked func(id, action string))
- func (v *View) SetOnTreeViewNodeClicked(onTreeViewNodeClicked func(id string))
- func (v *View) SetOnTreeViewNodeDoubleClicked(onTreeViewNodeDoubleClicked func(id string))
- func (v *View) SetPathParams(id string, params []domain.KeyValue)
- func (v *View) SetPostRequestSetPreview(id, preview string)
- func (v *View) SetPostRequestSetValues(id string, set domain.PostRequestSet)
- func (v *View) SetProtoFilePath(id, filePath string)
- func (v *View) SetQueryParams(id string, params []domain.KeyValue)
- func (v *View) SetSendingRequestLoaded(id string)
- func (v *View) SetSendingRequestLoading(id string)
- func (v *View) SetSetGrpcRequestBody(id, body string)
- func (v *View) SetTabDirty(id string, dirty bool)
- func (v *View) SetTreeViewNodePrefix(id string, req *domain.Request)
- func (v *View) SetURL(id, url string)
- func (v *View) ShowGRPCRequestError(id, title, content string)
- func (v *View) ShowPrompt(id, title, content, modalType string, ...)
- func (v *View) SwitchToTab(id string)
- func (v *View) UpdateTabTitle(id, title string)
- func (v *View) UpdateTreeNodeTitle(id, title string)
Constants ¶
View Source
const ( TypeRequest = "request" TypeCollection = "collection" TypeMeta = "Type" )
View Source
const ( MenuDuplicate = "Duplicate" MenuDelete = "Delete" MenuAddHTTPRequest = "Add HTTP Request" MenuAddGRPCRequest = "Add GRPC Request" MenuView = "View" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Container ¶
type Container interface { Layout(gtx layout.Context, theme *chapartheme.Theme) layout.Dimensions SetOnDataChanged(f func(id string, data any)) SetOnTitleChanged(f func(title string)) SetDataChanged(changed bool) SetOnSave(f func(id string)) ShowPrompt(title, content, modalType string, onSubmit func(selectedOption string, remember bool), options ...widgets.Option) HidePrompt() }
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func NewController ¶
func NewController(view *View, repo repository.Repository, model *state.Requests, envState *state.Environments, explorer *explorer.Explorer, restService *rest.Service, grpcService *grpc.Service) *Controller
func (*Controller) LoadData ¶
func (c *Controller) LoadData() error
type GrpcContainer ¶
type GrpcContainer interface { Container SetOnProtoFileSelect(func(id string)) SetProtoBodyFilePath(filePath string) SetOnReload(func(id string)) SetServices(services []domain.GRPCService) SetMethodsLoading(loading bool) SetResponseLoading(loading bool) SetOnInvoke(f func(id string)) SetResponse(response domain.GRPCResponseDetail) SetOnLoadRequestExample(f func(id string)) SetRequestBody(body string) ShowRequestPrompt(title, content, modalType string, onSubmit func(selectedOption string, remember bool), options ...widgets.Option) HideRequestPrompt() }
type RestContainer ¶
type RestContainer interface { Container SetHTTPResponse(response domain.HTTPResponseDetail) GetHTTPResponse() *domain.HTTPResponseDetail SetPostRequestSetPreview(preview string) ShowSendingRequestLoading() HideSendingRequestLoading() SetQueryParams(params []domain.KeyValue) SetPathParams(params []domain.KeyValue) SetURL(url string) SetPostRequestSetValues(set domain.PostRequestSet) SetOnPostRequestSetChanged(f func(id string, statusCode int, item, from, fromKey string)) SetOnBinaryFileSelect(f func(id string)) SetBinaryBodyFilePath(filePath string) SetOnFormDataFileSelect(f func(requestId, fieldId string)) AddFileToFormData(fieldId, filePath string) }
type View ¶
type View struct {
// contains filtered or unexported fields
}
func (*View) AddChildTreeViewNode ¶
func (*View) AddCollectionTreeViewNode ¶
func (v *View) AddCollectionTreeViewNode(collection *domain.Collection)
func (*View) AddFileToFormData ¶
func (*View) AddRequestTreeViewNode ¶
func (*View) AddTreeViewNode ¶
func (*View) ExpandTreeViewNode ¶
func (*View) GetHTTPResponse ¶
func (v *View) GetHTTPResponse(id string) *domain.HTTPResponseDetail
func (*View) GetTabType ¶
func (*View) GetTreeViewNodeType ¶
func (*View) HidePrompt ¶
func (*View) Layout ¶
func (v *View) Layout(gtx layout.Context, theme *chapartheme.Theme) layout.Dimensions
func (*View) OpenCollectionContainer ¶
func (v *View) OpenCollectionContainer(collection *domain.Collection)
func (*View) OpenRequestContainer ¶
func (*View) PopulateTreeView ¶
func (v *View) PopulateTreeView(requests []*domain.Request, collections []*domain.Collection)
func (*View) RemoveTreeViewNode ¶
func (*View) SetBinaryBodyFilePath ¶
func (*View) SetGRPCMethodsLoading ¶
func (*View) SetGRPCResponse ¶
func (v *View) SetGRPCResponse(id string, response domain.GRPCResponseDetail)
func (*View) SetGRPCServices ¶
func (v *View) SetGRPCServices(id string, services []domain.GRPCService)
func (*View) SetHTTPResponse ¶
func (v *View) SetHTTPResponse(id string, response domain.HTTPResponseDetail)
func (*View) SetOnBinaryFileSelect ¶
func (*View) SetOnCopyResponse ¶
func (*View) SetOnDataChanged ¶
func (*View) SetOnFormDataFileSelect ¶
func (*View) SetOnGrpcInvoke ¶
func (*View) SetOnGrpcLoadRequestExample ¶
func (*View) SetOnImport ¶
func (v *View) SetOnImport(f func())
func (*View) SetOnNewCollection ¶
func (v *View) SetOnNewCollection(onNewCollection func())
func (*View) SetOnNewRequest ¶
func (*View) SetOnPostRequestSetChanged ¶
func (*View) SetOnProtoFileSelect ¶
func (*View) SetOnServerInfoReload ¶
func (*View) SetOnSubmit ¶
func (*View) SetOnTabClose ¶
func (*View) SetOnTabSelected ¶
func (*View) SetOnTitleChanged ¶
func (*View) SetOnTreeViewMenuClicked ¶
func (*View) SetOnTreeViewNodeClicked ¶
func (*View) SetOnTreeViewNodeDoubleClicked ¶
func (*View) SetPostRequestSetPreview ¶
func (*View) SetPostRequestSetValues ¶
func (v *View) SetPostRequestSetValues(id string, set domain.PostRequestSet)
func (*View) SetProtoFilePath ¶
func (*View) SetSendingRequestLoaded ¶
func (*View) SetSendingRequestLoading ¶
func (*View) SetSetGrpcRequestBody ¶
func (*View) SetTabDirty ¶
func (*View) SetTreeViewNodePrefix ¶
func (*View) ShowGRPCRequestError ¶
func (*View) ShowPrompt ¶
func (*View) SwitchToTab ¶
func (*View) UpdateTabTitle ¶
func (*View) UpdateTreeNodeTitle ¶
Click to show internal directories.
Click to hide internal directories.