Documentation ¶
Overview ¶
Package identityhub implements a subset of Identity Hub data models, to support requesting identity hub data.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Message ¶
type Message struct { Descriptor map[string]interface{} `json:"descriptor"` Data string `json:"data,omitempty"` }
Message holds a single data element inside an identity hub response.
func (Message) GetObjectID ¶
GetObjectID returns the objectId of the Message.
type MessageResult ¶
type MessageResult struct { MessageID string `json:"messageId"` Status Status `json:"status"` Entries []Message `json:"entries,omitempty"` }
MessageResult holds a set of messages inside an identity hub response.
type Request ¶
type Request struct { RequestID string `json:"requestId"` Target string `json:"target"` Messages []Message `json:"messages"` }
Request contains an identity hub query.
func GetRequest ¶
func GetRequest( hubDID, messageMethod string, messageDescriptorData []map[string]interface{}, ) (string, *Request, error)
GetRequest constructs a Request with one message, for the given method, with message descriptor taken from the matching method in messageDescriptorData. Returns the object ID of the selected message, and the Request.
type Response ¶
type Response struct { RequestID string `json:"requestId"` Status *Status `json:"status"` Replies []MessageResult `json:"replies"` }
Response contains the results of an identity hub query.
func (Response) CheckStatus ¶
CheckStatus returns an error if this Response or any MessageResult within has a status other than http.StatusOK.