Documentation
¶
Index ¶
- Constants
- Variables
- func NewPawMux(h ...Handler) *mux
- type ActionHandlerMismatchError
- type ActionNotRegisteredError
- type CreateVaultHandler
- type CreateVaultHandlerRequestPayload
- type CreateVaultHandlerResponsePayload
- type GetAppStateHandler
- type GetAppStateHandlerRequestPayload
- type GetAppStateHandlerResponsePayload
- type GetLoginItemHandler
- type GetLoginItemHandlerRequestPayload
- type GetLoginItemHandlerResponsePayload
- type GetTLDPlusOneHandler
- type GetTLDPlusOneHandlerRequestPayload
- type GetTLDPlusOneHandlerResponsePayload
- type Handler
- type InvalidRequestPayloadError
- type ListItemsVaultHandler
- type ListItemsVaultHandlerRequestPayload
- type ListItemsVaultHandlerResponsePayload
- type ListVaultHandler
- type ListVaultHandlerResponsePayload
- type Request
- type Response
- type UnlockVaultHandler
- type UnlockVaultHandlerRequestPayload
- type UnlockVaultHandlerResponsePayload
Constants ¶
Variables ¶
View Source
var (
ErrInvalidMessageLenght = errors.New("invalid message lenght")
)
Functions ¶
Types ¶
type ActionHandlerMismatchError ¶
func (*ActionHandlerMismatchError) Error ¶
func (e *ActionHandlerMismatchError) Error() string
type ActionNotRegisteredError ¶
type ActionNotRegisteredError struct {
Action uint32
}
func (*ActionNotRegisteredError) Error ¶
func (e *ActionNotRegisteredError) Error() string
type CreateVaultHandler ¶
func (*CreateVaultHandler) Action ¶
func (h *CreateVaultHandler) Action() uint32
Action implements browser.Handler.
func (*CreateVaultHandler) Serve ¶
func (h *CreateVaultHandler) Serve(res *Response, req *Request)
Serve implements browser.Handler.
type CreateVaultHandlerResponsePayload ¶
type CreateVaultHandlerResponsePayload struct {
SessionID string `json:"session_id"`
}
type GetAppStateHandler ¶
func (*GetAppStateHandler) Action ¶
func (h *GetAppStateHandler) Action() uint32
Action implements browser.Handler.
func (*GetAppStateHandler) Serve ¶
func (h *GetAppStateHandler) Serve(res *Response, req *Request)
Serve implements browser.Handler.
type GetLoginItemHandler ¶
func (*GetLoginItemHandler) Action ¶
func (h *GetLoginItemHandler) Action() uint32
Action implements browser.Handler.
func (*GetLoginItemHandler) Serve ¶
func (h *GetLoginItemHandler) Serve(res *Response, req *Request)
Serve implements browser.Handler.
type GetTLDPlusOneHandler ¶
type GetTLDPlusOneHandler struct { }
func (*GetTLDPlusOneHandler) Action ¶
func (h *GetTLDPlusOneHandler) Action() uint32
Action implements browser.Handler.
func (*GetTLDPlusOneHandler) Serve ¶
func (h *GetTLDPlusOneHandler) Serve(res *Response, req *Request)
Serve implements browser.Handler.
type GetTLDPlusOneHandlerResponsePayload ¶
type GetTLDPlusOneHandlerResponsePayload struct {
TldPlusOne string `json:"tld_plus_one"`
}
type InvalidRequestPayloadError ¶
func (*InvalidRequestPayloadError) Error ¶
func (e *InvalidRequestPayloadError) Error() string
type ListItemsVaultHandler ¶
func (*ListItemsVaultHandler) Action ¶
func (h *ListItemsVaultHandler) Action() uint32
Action implements browser.Handler.
func (*ListItemsVaultHandler) Serve ¶
func (h *ListItemsVaultHandler) Serve(res *Response, req *Request)
Serve implements browser.Handler.
type ListItemsVaultHandlerResponsePayload ¶
type ListItemsVaultHandlerResponsePayload struct {
Items any `json:"items"`
}
type ListVaultHandler ¶
func (*ListVaultHandler) Action ¶
func (h *ListVaultHandler) Action() uint32
Action implements browser.Handler.
func (*ListVaultHandler) Serve ¶
func (h *ListVaultHandler) Serve(res *Response, req *Request)
Serve implements browser.Handler.
type ListVaultHandlerResponsePayload ¶
type ListVaultHandlerResponsePayload struct {
Vaults []string `json:"vaults"`
}
type Request ¶
type Request struct { Action uint32 `json:"action"` //the action to handled Payload json.RawMessage `json:"payload"` //the json raw data will be unmarshaled by the action handler }
Request represents the native message request
func (*Request) IsPayloadEmpty ¶
IsPayloadEmpty returns true if the payload contains no data
type Response ¶
type Response struct { Action uint32 `json:"action"` //the handled action Error error `json:"error"` //the error occurred handling the action, if any Payload any `json:"payload"` //the paylod action response to be marshaled as json }
Response represents the native message response
func (*Response) MarshalJSON ¶
Custom marshal method for Response
type UnlockVaultHandler ¶
func (*UnlockVaultHandler) Action ¶
func (h *UnlockVaultHandler) Action() uint32
Action implements browser.Handler.
func (*UnlockVaultHandler) Serve ¶
func (h *UnlockVaultHandler) Serve(res *Response, req *Request)
Serve implements browser.Handler.
type UnlockVaultHandlerResponsePayload ¶
type UnlockVaultHandlerResponsePayload struct {
SessionID string `json:"session_id"`
}
Click to show internal directories.
Click to hide internal directories.