Documentation ¶
Index ¶
Constants ¶
View Source
const ( SignatureHeader = "Reearth-Signature" EventItemCreate = "item.create" EventItemUpdate = "item.update" EventItemPublish = "item.publish" EventAssetDecompress = "asset.decompress" )
Variables ¶
View Source
var Now = time.Now
Functions ¶
func Middleware ¶
func Middleware(config MiddlewareConfig) func(http.Handler) http.Handler
Types ¶
type Handler ¶
func MergeHandlers ¶
type Integration ¶
type Integration struct {
ID string `json:"id"`
}
type MiddlewareConfig ¶
type Operator ¶
type Operator struct { User *User `json:"user,omitempty"` Integration *Integration `json:"integration,omitempty"` Machine *Machine `json:"machine,omitempty"` }
func (Operator) IsIntegration ¶
func (Operator) IsIntegrationBy ¶
type Payload ¶
type Payload struct { Type string `json:"type,omitempty"` Data json.RawMessage `json:"data,omitempty"` AssetData *AssetData `json:"-"` ItemData *ItemData `json:"-"` Operator Operator `json:"operator,omitempty"` Sig string `json:"-"` Body []byte `json:"-"` }
func GetPayload ¶
func (*Payload) MarshalJSON ¶
func (*Payload) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.