Documentation ¶
Index ¶
- Constants
- func GetCommentObjectID(aggregateID string, tenant string) string
- func NewCommentCreateEvent(aggregate eventstore.Aggregate, dataFields CommentDataFields, ...) (eventstore.Event, error)
- func NewCommentUpdateEvent(aggregate eventstore.Aggregate, content, contentType, source string, ...) (eventstore.Event, error)
- type Comment
- type CommentAggregate
- func (a *CommentAggregate) HandleGRPCRequest(ctx context.Context, request any, params map[string]any) (any, error)
- func (a *CommentAggregate) UpsertCommentGrpcRequest(ctx context.Context, request *commentpb.UpsertCommentGrpcRequest) (string, error)
- func (a *CommentAggregate) When(evt eventstore.Event) error
- type CommentCreateEvent
- type CommentDataFields
- type CommentUpdateEvent
Constants ¶
View Source
const ( CommentCreateV1 = "V1_COMMENT_CREATE" CommentUpdateV1 = "V1_COMMENT_UPDATE" )
View Source
const (
CommentAggregateType eventstore.AggregateType = "comment"
)
Variables ¶
This section is empty.
Functions ¶
func GetCommentObjectID ¶
func NewCommentCreateEvent ¶
func NewCommentCreateEvent(aggregate eventstore.Aggregate, dataFields CommentDataFields, source commonmodel.Source, externalSystem commonmodel.ExternalSystem, createdAt, updatedAt time.Time) (eventstore.Event, error)
func NewCommentUpdateEvent ¶
func NewCommentUpdateEvent(aggregate eventstore.Aggregate, content, contentType, source string, externalSystem commonmodel.ExternalSystem, updatedAt time.Time) (eventstore.Event, error)
Types ¶
type Comment ¶
type Comment struct { ID string `json:"id"` Tenant string `json:"tenant"` Content string `json:"content"` ContentType string `json:"contentType,omitempty"` AuthorUserId string `json:"authorUserId,omitempty"` CommentedIssueId string `json:"commentedIssueId,omitempty"` Source commonmodel.Source `json:"source"` ExternalSystems []commonmodel.ExternalSystem `json:"externalSystem"` CreatedAt time.Time `json:"createdAt,omitempty"` UpdatedAt time.Time `json:"updatedAt,omitempty"` }
type CommentAggregate ¶
type CommentAggregate struct { *eventstore.CommonTenantIdAggregate Comment *Comment }
func NewCommentAggregateWithTenantAndID ¶
func NewCommentAggregateWithTenantAndID(tenant, id string) *CommentAggregate
func (*CommentAggregate) HandleGRPCRequest ¶
func (*CommentAggregate) UpsertCommentGrpcRequest ¶
func (a *CommentAggregate) UpsertCommentGrpcRequest(ctx context.Context, request *commentpb.UpsertCommentGrpcRequest) (string, error)
func (*CommentAggregate) When ¶
func (a *CommentAggregate) When(evt eventstore.Event) error
type CommentCreateEvent ¶
type CommentCreateEvent struct { Tenant string `json:"tenant" validate:"required"` Content string `json:"content"` ContentType string `json:"contentType"` AuthorUserId string `json:"authorUserId"` CommentedIssueId string `json:"commentedIssueId"` Source string `json:"source"` AppSource string `json:"appSource"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` ExternalSystem commonmodel.ExternalSystem `json:"externalSystem"` }
type CommentDataFields ¶
type CommentUpdateEvent ¶
type CommentUpdateEvent struct { Tenant string `json:"tenant" validate:"required"` Content string `json:"content"` ContentType string `json:"contentType"` UpdatedAt time.Time `json:"updatedAt"` Source string `json:"source"` ExternalSystem commonmodel.ExternalSystem `json:"externalSystem,omitempty"` }
Click to show internal directories.
Click to hide internal directories.