Documentation ¶
Index ¶
Constants ¶
View Source
const ( OperationTypeCreated operationType = "created" OperationTypeUpdated operationType = "updated" OperationTypeDeleted operationType = "deleted" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct { Specversion string `json:"specversion"` Type string `json:"type"` Source string `json:"source"` Id string `json:"id"` Subject string `json:"subject"` Time time.Time `json:"time"` DataContentType string `json:"datacontenttype"` Data interface{} `json:"data"` }
Todo: get rid of this Event and have an Event (as event output) with all the assignments going on the New* functions
func NewRelationshipEvent ¶
func NewRelationshipEvent(operationType OperationType, relationship *model.Relationship, reportedTime time.Time) (*Event, error)
func NewResourceEvent ¶
type OperationType ¶
type OperationType interface {
OperationType() operationType
}
type RelationshipData ¶
type RelationshipData struct { Metadata RelationshipMetadata `json:"metadata"` ReporterData RelationshipReporter `json:"reporter_data"` ResourceData model.JsonObject `json:"resource_data,omitempty"` }
type RelationshipMetadata ¶
type RelationshipReporter ¶
type RelationshipReporter struct { ReporterType string `json:"reporter_type"` SubjectLocalResourceId string `json:"subject_local_resource_id"` ObjectLocalResourceId string `json:"object_local_resource_id"` ReporterVersion string `json:"reporter_version"` ReporterInstanceId string `json:"reporter_instance_id"` }
type ResourceData ¶
type ResourceData struct { Metadata ResourceMetadata `json:"metadata"` ReporterData ResourceReporter `json:"reporter_data"` ResourceData model.JsonObject `json:"resource_data,omitempty"` }
type ResourceLabel ¶
type ResourceMetadata ¶
type ResourceMetadata struct { Id string `json:"id"` ResourceType string `json:"resource_type"` OrgId string `json:"org_id"` CreatedAt *time.Time `json:"created_at,omitempty"` UpdatedAt *time.Time `json:"updated_at,omitempty"` DeletedAt *time.Time `json:"deleted_at,omitempty"` WorkspaceId string `json:"workspace_id"` Labels []ResourceLabel `json:"labels,omitempty"` }
type ResourceReporter ¶
type ResourceReporter struct { ReporterInstanceId string `json:"reporter_instance_id"` ReporterType string `json:"reporter_type"` ConsoleHref string `json:"console_href"` ApiHref string `json:"api_href"` LocalResourceId string `json:"local_resource_id"` ReporterVersion string `json:"reporter_version"` }
Click to show internal directories.
Click to hide internal directories.