Documentation
¶
Index ¶
- Variables
- type Event
- type EventAttributes
- type EventParentType
- type Events
- func (e *Events) AccessRequestApproved(ctx context.Context, data models.AccessRequest) error
- func (e *Events) AccessRequestCreated(ctx context.Context, data models.AccessRequest) error
- func (e *Events) AccessRequestDeleted(ctx context.Context, data models.AccessRequest) error
- func (e *Events) AccessRequestExpired(ctx context.Context, data models.AccessRequest) error
- func (e *Events) NewDriver() *Events
- func (e *Events) PermissionDenied(ctx context.Context, sub string, grp []string, obj string, act string) error
- func (e *Events) UserLoggedIn(ctx context.Context, claims models.ClaimsMap) error
Constants ¶
This section is empty.
Variables ¶
View Source
var Config = config.GetConfig().Events
View Source
var Driver = new(Events)
View Source
var Kafka = kafkadriver.GetDriver()
View Source
var Tracer = otel.Tracer("eventsdriver")
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct { ID string `gorm:"primaryKey" json:"id" example:"0d2dab7cdcb4cf1d"` // Pod ID CreatedAt time.Time `swaggerignore:"true" json:"createdAt,omitempty"` UpdatedAt time.Time `swaggerignore:"true" json:"updatedAt,omitempty"` TransactionID string `gorm:"index" json:"transactionId" example:"0d2dab7cdcb4cf1d"` ParentID string `gorm:"index" swaggerignore:"true" json:"parentId"` ParentType EventParentType `gorm:"index" swaggerignore:"true" json:"parentType"` Tenant string `gorm:"index" swaggerignore:"true" json:"tenant"` Attributes EventAttributes `gorm:"embedded;embeddedPrefix:attributes_" json:"attributes"` Message string `json:"message"` Data datatypes.JSONMap `swaggerignore:"true" json:"data"` }
type EventAttributes ¶
type EventAttributes struct { Source string `gorm:"index" example:"sview-hook" json:"source"` Type string `gorm:"index" example:"gitlab-mr" json:"type"` Date time.Time `gorm:"index" example:"2022-02-28 18:03:49.750647+00" json:"date"` Author string `gorm:"index" example:"john.doe" json:"author"` }
func (*EventAttributes) UnmarshalJSON ¶
func (a *EventAttributes) UnmarshalJSON(data []byte) error
type EventParentType ¶
type EventParentType string
const ( EventParentApplication EventParentType = "application" EventParentParameter EventParentType = "parameter" EventParentSystem EventParentType = "system" EventParentSecurity EventParentType = "security" )
type Events ¶
type Events struct { }
func (*Events) AccessRequestApproved ¶
func (*Events) AccessRequestCreated ¶
func (*Events) AccessRequestDeleted ¶
func (*Events) AccessRequestExpired ¶
func (*Events) PermissionDenied ¶
Click to show internal directories.
Click to hide internal directories.