Documentation ¶
Index ¶
- Constants
- func ChangeRequestButtons(client *notionapi.Client, pageid string, nForward notionapi.ToDoBlock, ...) error
- func ClearRequestCode(client *notionapi.Client, codeBlockID notionapi.BlockID) (notionapi.Block, error)
- func ClearResponseCode(client *notionapi.Client, codeBlockID notionapi.BlockID) (notionapi.Block, error)
- func DisableRequestButtons(client *notionapi.Client, pageid string) error
- func EnableRequestButtons(client *notionapi.Client, pageid string) error
- func GetCodeBlockByName(children notionapi.Blocks, name string) (requestCodeBlock notionapi.CodeBlock, err error)
- func GetProxyStatus(children notionapi.Blocks) (bool, error)
- func GetRequestBlock(children notionapi.Blocks) (requestBlock notionapi.Heading2Block, err error)
- func GetRequestButtonsColumnBlock(children notionapi.Blocks) (buttonsBlock notionapi.ColumnListBlock, err error)
- func GetRequestCodeBlock(children notionapi.Blocks) (requestCodeBlock notionapi.CodeBlock, err error)
- func GetResponseBlock(children notionapi.Blocks) (responseBlock notionapi.Heading2Block, err error)
- func GetResponseCodeBlock(children notionapi.Blocks) (requestCodeBlock notionapi.CodeBlock, err error)
- func ListenDropButton(client *notionapi.Client, pageid string, stopchan chan struct{}, ...)
- func ListenForwardButton(client *notionapi.Client, pageid string, stopchan chan struct{}, ...)
- func ProxyRequestHTTPHandler(client *notionapi.Client, pageid string, codeReq notionapi.CodeBlock, ...) (h goproxy.ReqHandler)
- func ProxyRequestHTTPSHandler() func(session *gomitmproxy.Session) (*http.Request, *http.Response)
- func ProxyResponseHTTPHandler(client *notionapi.Client, pageid string, codeResp notionapi.CodeBlock) (h goproxy.RespHandler)
- func RequestDropButtonStatus(client *notionapi.Client, pageid string) (checked bool, err error)
- func RequestForwardButtonStatus(client *notionapi.Client, pageid string) (checked bool, err error)
- func RequestProxyPageChildren(client *notionapi.Client, pageid string) (childrenBlocks notionapi.Blocks, err error)
- func RequestProxyStatus(client *notionapi.Client, pageid string) (active bool, err error)
- func RequestRequestButtonByName(client *notionapi.Client, pageid string, name string) (button notionapi.ToDoBlock, err error)
- func RequestRequestCodeContent(client *notionapi.Client, pageid string) (request string, err error)
- func UpdateCodeContent(client *notionapi.Client, codeBlockID notionapi.BlockID, content string) (notionapi.Block, error)
- func WaitAction(client *notionapi.Client, pageid string) string
Constants ¶
const DROP = "DROP"
const FORWARD = "FORWARD"
const ON = "ON"
const REQUEST = "Request"
const RESPONSE = "Response"
Variables ¶
This section is empty.
Functions ¶
func ChangeRequestButtons ¶
func ChangeRequestButtons(client *notionapi.Client, pageid string, nForward notionapi.ToDoBlock, nDrop notionapi.ToDoBlock) error
ChangeRequestButton: change request buttons appearance
func ClearRequestCode ¶
func ClearRequestCode(client *notionapi.Client, codeBlockID notionapi.BlockID) (notionapi.Block, error)
ClearRequestCode: make the code section empty
func ClearResponseCode ¶
func ClearResponseCode(client *notionapi.Client, codeBlockID notionapi.BlockID) (notionapi.Block, error)
ClearResponseCode: make the code section empty
func DisableRequestButtons ¶
DisableRequestButtons: print request buttons as disabled
func EnableRequestButtons ¶
EnableRequestButtons: print request buttons as available (uncheck them also)
func GetCodeBlockByName ¶
func GetCodeBlockByName(children notionapi.Blocks, name string) (requestCodeBlock notionapi.CodeBlock, err error)
GetCodeBlockByName: Obtain the code block object under the section specified by name (name={"Request","Response"})
func GetProxyStatus ¶
GetProxyStatus: get proxy status from page's blocks
func GetRequestBlock ¶
func GetRequestBlock(children notionapi.Blocks) (requestBlock notionapi.Heading2Block, err error)
GetRequestBlock: retrieve "Request" block from page's blocks
func GetRequestButtonsColumnBlock ¶
func GetRequestButtonsColumnBlock(children notionapi.Blocks) (buttonsBlock notionapi.ColumnListBlock, err error)
GetRequestButtonsColumnBlock: retrieve buttons within request block (column list block)
func GetRequestCodeBlock ¶
func GetRequestCodeBlock(children notionapi.Blocks) (requestCodeBlock notionapi.CodeBlock, err error)
GetRequestCodeBlock: Obtain the code block object under the request heading
func GetResponseBlock ¶
func GetResponseBlock(children notionapi.Blocks) (responseBlock notionapi.Heading2Block, err error)
GetResponseBlock: retrieve "Response" block from page's blocks
func GetResponseCodeBlock ¶
func GetResponseCodeBlock(children notionapi.Blocks) (requestCodeBlock notionapi.CodeBlock, err error)
GetResponseCodeBlock: Obtain the code block object under the response heading
func ListenDropButton ¶
func ListenDropButton(client *notionapi.Client, pageid string, stopchan chan struct{}, action chan<- string)
ListenDropButton: function that constantly check the drop button status to see if it is checked. Update channels consequently
func ListenForwardButton ¶
func ListenForwardButton(client *notionapi.Client, pageid string, stopchan chan struct{}, action chan<- string)
ListenForwardButton: function that constantly check the forward button status to see if it is checked. Update channels consequently
func ProxyRequestHTTPHandler ¶ added in v0.0.2
func ProxyRequestHTTPHandler(client *notionapi.Client, pageid string, codeReq notionapi.CodeBlock, codeResp notionapi.CodeBlock) (h goproxy.ReqHandler)
ProxyRequestHTTPHandler: Proxy handler sending request to notion page
func ProxyRequestHTTPSHandler ¶ added in v0.0.2
ProxyRequestHTTPSHandler:
func ProxyResponseHTTPHandler ¶ added in v0.0.2
func ProxyResponseHTTPHandler(client *notionapi.Client, pageid string, codeResp notionapi.CodeBlock) (h goproxy.RespHandler)
ProxyResponseHTTPHandler: Proxy handler sending response to notion page
func RequestDropButtonStatus ¶
RequestDropButtonStatus: check if drop button is checked
func RequestForwardButtonStatus ¶
RequestForwardButtonStatus: check if forward button is checked
func RequestProxyPageChildren ¶
func RequestProxyPageChildren(client *notionapi.Client, pageid string) (childrenBlocks notionapi.Blocks, err error)
RequestProxyPageChildren: Returns the children block of the Listener page
func RequestProxyStatus ¶
RequestProxyStatus: request notion api to determine if proxy is active
func RequestRequestButtonByName ¶
func RequestRequestButtonByName(client *notionapi.Client, pageid string, name string) (button notionapi.ToDoBlock, err error)
RequestRequestButtonByName:return specific to_do block within "request" block is checked. name: {"FORWARD", "DROP"}
func RequestRequestCodeContent ¶
RequestCodeBlock: Obtain the content of code block object under the request heading
Types ¶
This section is empty.