Documentation ¶
Index ¶
- Constants
- func ToEntry(e EventTyper, eventBusName string) (types.PutEventsRequestEntry, error)
- type EventTyper
- type GrantActivated
- type GrantCreated
- type GrantEventPayload
- type GrantExpired
- type GrantFailed
- type GrantRevoked
- type RequestApproved
- type RequestCancelled
- type RequestCreated
- type RequestDeclined
- type RequestEventPayload
- type Sender
- type SenderOpts
Constants ¶
const ( GrantCreatedType = "grant.created" GrantActivatedType = "grant.activated" GrantExpiredType = "grant.expired" GrantRevokedType = "grant.revoked" GrantFailedType = "grant.failed" )
const ( RequestCreatedType = "request.created" RequestApprovedType = "request.approved" RequestCancelledType = "request.cancelled" RequestDeclinedType = "request.declined" )
Variables ¶
This section is empty.
Functions ¶
func ToEntry ¶
func ToEntry(e EventTyper, eventBusName string) (types.PutEventsRequestEntry, error)
ToEntry returns an EventBridge PutEventsRequestEntry with the 'Detail', 'DetailType', and 'Source' fields filled in based on the event.
Types ¶
type EventTyper ¶
type EventTyper interface {
EventType() string
}
type GrantActivated ¶
GrantActivated is emitted when a grant is activated by the Access Handler. 'Activated' means that the assignment to the resource was completed successfully.
func (GrantActivated) EventType ¶
func (GrantActivated) EventType() string
type GrantCreated ¶
GrantCreated is emitted when a new grant is created by the Access Handler.
func (GrantCreated) EventType ¶
func (GrantCreated) EventType() string
type GrantEventPayload ¶
GrantEventPayload is a payload which is common to all Grant events. It is used to conveniently unmarshal the Grant payloads in our event handler code.
type GrantExpired ¶
GrantExpired is emitted when a grant is expired by the Access Handler. 'Expired' means that the assignment to the resource was removed successfully, at the time that the grant was supposed to end.
func (GrantExpired) EventType ¶
func (GrantExpired) EventType() string
type GrantFailed ¶
type GrantFailed struct { Grant types.Grant `json:"grant"` // Reason contains details about why the grant failed. Reason string `json:"reason"` }
GrantFailed is emitted when the access handler encounters an unrecoverable error when activating or deactivating a grant.
func (GrantFailed) EventType ¶
func (GrantFailed) EventType() string
type GrantRevoked ¶
type GrantRevoked struct { Grant types.Grant `json:"grant"` // the commonfate internal id of the actor who revoked the grant Actor string `json:"actor"` // the email address of the actor who revoked the grant RevokerEmail string `json:"revokerEmail"` }
GrantRevoked is emitted when a grant is revoked by the Access Handler. 'Revoked' means that the assignment to the resource was removed successfully before the time that the grant was supposed to end.
The GrantRevoked event is only emitted if Common Fate is used to revoke access. If you manually remove the resource assignment in the provider directly (such as removing the user from the Okta group which they were granted access to), this event will not be emitted.
func (GrantRevoked) EventType ¶
func (GrantRevoked) EventType() string
type RequestApproved ¶
type RequestApproved struct { Request access.Request `json:"request"` ReviewerID string `json:"reviewerId"` ReviewerEmail string `json:"reviewerEmail"` }
RequestApproved is emitted when a user's request is approved.
func (RequestApproved) EventType ¶
func (RequestApproved) EventType() string
type RequestCancelled ¶
func (RequestCancelled) EventType ¶
func (RequestCancelled) EventType() string
type RequestCreated ¶
type RequestCreated struct { Request access.Request `json:"request"` RequestorEmail string `json:"requestorEmail"` }
RequestCreated is emitted when a user requests access to something in the Common Fate service.
func (RequestCreated) EventType ¶
func (RequestCreated) EventType() string
type RequestDeclined ¶
type RequestDeclined struct { Request access.Request `json:"request"` ReviewerID string `json:"reviewerId"` ReviewerEmail string `json:"reviewerEmail"` }
func (RequestDeclined) EventType ¶
func (RequestDeclined) EventType() string
type RequestEventPayload ¶
type RequestEventPayload struct { Request access.Request `json:"request"` ReviewerID string `json:"reviewerId"` }
RequestEventPayload is a payload which is common to all Request events. It is used to conveniently unmarshal the Request payloads in our event handler code.
type Sender ¶
type Sender struct {
// contains filtered or unexported fields
}
EventSender provides methods to submit events to a Common Fate EventBridge bus.
type SenderOpts ¶
type SenderOpts struct {
EventBusARN string
}