Documentation ¶
Index ¶
- type AuditType
- type ImageComment
- type ImageTag
- type ImageTaggingAction
- type ImageTaggingAudit
- type ImageTaggingRepository
- type ImageTaggingRepositoryImpl
- func (impl *ImageTaggingRepositoryImpl) DeleteReleaseTagInBulk(tx *pg.Tx, imageTags []*ImageTag) error
- func (impl *ImageTaggingRepositoryImpl) GetImageComment(artifactId int) (ImageComment, error)
- func (impl *ImageTaggingRepositoryImpl) GetImageCommentsByArtifactIds(artifactIds []int) ([]*ImageComment, error)
- func (impl *ImageTaggingRepositoryImpl) GetTagsByAppId(appId int) ([]*ImageTag, error)
- func (impl *ImageTaggingRepositoryImpl) GetTagsByArtifactId(artifactId int) ([]*ImageTag, error)
- func (impl *ImageTaggingRepositoryImpl) SaveAuditLogsInBulk(tx *pg.Tx, imageTaggingAudit []*ImageTaggingAudit) error
- func (impl *ImageTaggingRepositoryImpl) SaveImageComment(tx *pg.Tx, imageComment *ImageComment) error
- func (impl *ImageTaggingRepositoryImpl) SaveReleaseTagsInBulk(tx *pg.Tx, imageTags []*ImageTag) error
- func (impl *ImageTaggingRepositoryImpl) UpdateImageComment(tx *pg.Tx, imageComment *ImageComment) error
- func (impl *ImageTaggingRepositoryImpl) UpdateReleaseTagInBulk(tx *pg.Tx, imageTags []*ImageTag) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ImageComment ¶
type ImageComment struct { TableName struct{} `sql:"image_comments" json:"-" pg:",discard_unknown_columns"` Id int `sql:"id,pk" json:"id"` Comment string `sql:"comment" json:"comment"` ArtifactId int `sql:"artifact_id" json:"artifactId"` UserId int `sql:"user_id" json:"-"` //currently not sending userId in json response }
type ImageTag ¶
type ImageTag struct { TableName struct{} `sql:"release_tags" json:"-" pg:",discard_unknown_columns"` Id int `sql:"id,pk" json:"id"` TagName string `sql:"tag_name" json:"tagName"` AppId int `sql:"app_id" json:"appId"` ArtifactId int `sql:"artifact_id" json:"artifactId"` Deleted bool `sql:"deleted" json:"deleted"` //this flag is to check soft delete }
type ImageTaggingAction ¶
type ImageTaggingAction int
const ActionEdit ImageTaggingAction = 1
this action is only allowed for imageComments
const ActionHardDelete ImageTaggingAction = 3
const ActionSave ImageTaggingAction = 0
const ActionSoftDelete ImageTaggingAction = 2
type ImageTaggingAudit ¶
type ImageTaggingAudit struct { TableName struct{} `sql:"image_tagging_audit" json:"-" pg:",discard_unknown_columns"` Id int `sql:"id,pk"` Data string `sql:"data"` DataType AuditType `sql:"data_type"` ArtifactId int `sql:"artifact_id"` UpdatedOn time.Time `sql:"updated_on"` UpdatedBy int `sql:"updated_by"` Action ImageTaggingAction `sql:"action"` }
type ImageTaggingRepository ¶
type ImageTaggingRepository interface { //transaction util funcs sql.TransactionWrapper SaveAuditLogsInBulk(tx *pg.Tx, imageTaggingAudit []*ImageTaggingAudit) error SaveReleaseTagsInBulk(tx *pg.Tx, imageTags []*ImageTag) error SaveImageComment(tx *pg.Tx, imageComment *ImageComment) error GetTagsByAppId(appId int) ([]*ImageTag, error) GetTagsByArtifactId(artifactId int) ([]*ImageTag, error) GetImageComment(artifactId int) (ImageComment, error) GetImageCommentsByArtifactIds(artifactIds []int) ([]*ImageComment, error) UpdateReleaseTagInBulk(tx *pg.Tx, imageTags []*ImageTag) error UpdateImageComment(tx *pg.Tx, imageComment *ImageComment) error DeleteReleaseTagInBulk(tx *pg.Tx, imageTags []*ImageTag) error }
type ImageTaggingRepositoryImpl ¶
type ImageTaggingRepositoryImpl struct { *sql.TransactionUtilImpl // contains filtered or unexported fields }
func NewImageTaggingRepositoryImpl ¶
func NewImageTaggingRepositoryImpl(db *pg.DB, TransactionUtilImpl *sql.TransactionUtilImpl) *ImageTaggingRepositoryImpl
func (*ImageTaggingRepositoryImpl) DeleteReleaseTagInBulk ¶
func (impl *ImageTaggingRepositoryImpl) DeleteReleaseTagInBulk(tx *pg.Tx, imageTags []*ImageTag) error
func (*ImageTaggingRepositoryImpl) GetImageComment ¶
func (impl *ImageTaggingRepositoryImpl) GetImageComment(artifactId int) (ImageComment, error)
func (*ImageTaggingRepositoryImpl) GetImageCommentsByArtifactIds ¶
func (impl *ImageTaggingRepositoryImpl) GetImageCommentsByArtifactIds(artifactIds []int) ([]*ImageComment, error)
func (*ImageTaggingRepositoryImpl) GetTagsByAppId ¶
func (impl *ImageTaggingRepositoryImpl) GetTagsByAppId(appId int) ([]*ImageTag, error)
func (*ImageTaggingRepositoryImpl) GetTagsByArtifactId ¶
func (impl *ImageTaggingRepositoryImpl) GetTagsByArtifactId(artifactId int) ([]*ImageTag, error)
func (*ImageTaggingRepositoryImpl) SaveAuditLogsInBulk ¶
func (impl *ImageTaggingRepositoryImpl) SaveAuditLogsInBulk(tx *pg.Tx, imageTaggingAudit []*ImageTaggingAudit) error
func (*ImageTaggingRepositoryImpl) SaveImageComment ¶
func (impl *ImageTaggingRepositoryImpl) SaveImageComment(tx *pg.Tx, imageComment *ImageComment) error
func (*ImageTaggingRepositoryImpl) SaveReleaseTagsInBulk ¶
func (impl *ImageTaggingRepositoryImpl) SaveReleaseTagsInBulk(tx *pg.Tx, imageTags []*ImageTag) error
func (*ImageTaggingRepositoryImpl) UpdateImageComment ¶
func (impl *ImageTaggingRepositoryImpl) UpdateImageComment(tx *pg.Tx, imageComment *ImageComment) error
func (*ImageTaggingRepositoryImpl) UpdateReleaseTagInBulk ¶
func (impl *ImageTaggingRepositoryImpl) UpdateReleaseTagInBulk(tx *pg.Tx, imageTags []*ImageTag) error
this will update the provided release tag
Click to show internal directories.
Click to hide internal directories.