Documentation ¶
Index ¶
- Constants
- func NewMovie(d db.DBTX, logger *zap.SugaredLogger, moviec tfidf.MovieGenreClient) *movie
- type Activity
- func (a *Activity) ByID(ctx context.Context, d db.DBTX, id db.ActivityID) (*db.Activity, error)
- func (a *Activity) ByName(ctx context.Context, d db.DBTX, name string, projectID db.ProjectID) (*db.Activity, error)
- func (a *Activity) ByProjectID(ctx context.Context, d db.DBTX, projectID db.ProjectID) ([]db.Activity, error)
- func (a *Activity) Create(ctx context.Context, d db.DBTX, params *db.ActivityCreateParams) (*db.Activity, error)
- func (a *Activity) Delete(ctx context.Context, d db.DBTX, id db.ActivityID) (*db.Activity, error)
- func (a *Activity) Update(ctx context.Context, d db.DBTX, id db.ActivityID, ...) (*db.Activity, error)
- type Admin
- type AppClaims
- type Authentication
- func (a *Authentication) CreateAPIKeyForUser(ctx context.Context, user *db.User) (*db.UserAPIKey, error)
- func (a *Authentication) CreateAccessTokenForUser(ctx context.Context, user *db.User) (string, error)
- func (a *Authentication) GetOrRegisterUserFromUserInfo(ctx context.Context, userinfo oidc.UserInfo) (*db.User, error)
- func (a *Authentication) GetUserFromAPIKey(ctx context.Context, apiKey string) (*db.User, error)
- func (a *Authentication) GetUserFromAccessToken(ctx context.Context, token string) (*db.User, error)
- func (a *Authentication) ParseToken(ctx context.Context, token string) (*AppClaims, error)
- type Authorization
- func (a *Authorization) DefaultScopes(role models.Role) models.Scopes
- func (a *Authorization) HasRequiredRole(role Role, requiredRole models.Role) error
- func (a *Authorization) HasRequiredScopes(scopes models.Scopes, requiredScopes models.Scopes) error
- func (a *Authorization) RoleByName(role models.Role) Role
- func (a *Authorization) RoleByRank(rank int) (Role, bool)
- func (a *Authorization) ScopeByName(scope string) (Scope, error)
- type Board
- type DemoTwoWorkItem
- func (w *DemoTwoWorkItem) AssignTag(ctx context.Context, d db.DBTX, params *db.WorkItemWorkItemTagCreateParams) error
- func (w *DemoTwoWorkItem) ByID(ctx context.Context, d db.DBTX, id db.WorkItemID) (*db.WorkItem, error)
- func (w *DemoTwoWorkItem) Create(ctx context.Context, d db.DBTX, params DemoTwoWorkItemCreateParams) (*db.WorkItem, error)
- func (w *DemoTwoWorkItem) Delete(ctx context.Context, d db.DBTX, id db.WorkItemID) (*db.WorkItem, error)
- func (w *DemoTwoWorkItem) List(ctx context.Context, d db.DBTX, teamID db.TeamID) ([]db.WorkItem, error)
- func (w *DemoTwoWorkItem) ListDeleted(ctx context.Context, d db.DBTX, teamID db.TeamID) ([]db.WorkItem, error)
- func (w *DemoTwoWorkItem) RemoveTag(ctx context.Context, d db.DBTX, tagID db.WorkItemTagID, ...) error
- func (w *DemoTwoWorkItem) Restore(ctx context.Context, d db.DBTX, id db.WorkItemID) (*db.WorkItem, error)
- func (w *DemoTwoWorkItem) Update(ctx context.Context, d db.DBTX, id db.WorkItemID, ...) (*db.WorkItem, error)
- type DemoTwoWorkItemCreateParams
- type DemoWorkItem
- func (w *DemoWorkItem) AssignTag(ctx context.Context, d db.DBTX, params *db.WorkItemWorkItemTagCreateParams) error
- func (w *DemoWorkItem) ByID(ctx context.Context, d db.DBTX, id db.WorkItemID) (*db.WorkItem, error)
- func (w *DemoWorkItem) Create(ctx context.Context, d db.DBTX, params DemoWorkItemCreateParams) (*db.WorkItem, error)
- func (w *DemoWorkItem) Delete(ctx context.Context, d db.DBTX, id db.WorkItemID) (*db.WorkItem, error)
- func (w *DemoWorkItem) List(ctx context.Context, d db.DBTX, teamID int) ([]db.WorkItem, error)
- func (w *DemoWorkItem) ListDeleted(ctx context.Context, d db.DBTX, teamID db.TeamID) ([]db.WorkItem, error)
- func (w *DemoWorkItem) RemoveTag(ctx context.Context, d db.DBTX, tagID db.WorkItemTagID, ...) error
- func (w *DemoWorkItem) Restore(ctx context.Context, d db.DBTX, id db.WorkItemID) (*db.WorkItem, error)
- func (w *DemoWorkItem) Update(ctx context.Context, d db.DBTX, id db.WorkItemID, ...) (*db.WorkItem, error)
- type DemoWorkItemCreateParams
- type KanbanStep
- type Member
- type Notification
- type Project
- func (p *Project) ByID(ctx context.Context, d db.DBTX, projectID db.ProjectID) (*db.Project, error)
- func (p *Project) ByName(ctx context.Context, d db.DBTX, name models.Project) (*db.Project, error)
- func (p *Project) MergeConfigFields(ctx context.Context, d db.DBTX, projectName models.Project, ...) (*models.ProjectConfig, error)
- type Role
- type Scope
- type Team
- func (t *Team) ByID(ctx context.Context, d db.DBTX, id db.TeamID) (*db.Team, error)
- func (t *Team) ByName(ctx context.Context, d db.DBTX, name string, projectID db.ProjectID) (*db.Team, error)
- func (t *Team) Create(ctx context.Context, d db.DBTX, params *db.TeamCreateParams) (*db.Team, error)
- func (t *Team) Delete(ctx context.Context, d db.DBTX, id db.TeamID) (*db.Team, error)
- func (t *Team) Update(ctx context.Context, d db.DBTX, id db.TeamID, params *db.TeamUpdateParams) (*db.Team, error)
- type TimeEntry
- func (a *TimeEntry) ByID(ctx context.Context, d db.DBTX, id db.TimeEntryID) (*db.TimeEntry, error)
- func (a *TimeEntry) Create(ctx context.Context, d db.DBTX, caller *db.User, ...) (*db.TimeEntry, error)
- func (a *TimeEntry) Delete(ctx context.Context, d db.DBTX, id db.TimeEntryID) (*db.TimeEntry, error)
- func (a *TimeEntry) Update(ctx context.Context, d db.DBTX, id db.TimeEntryID, ...) (*db.TimeEntry, error)
- type User
- func (u *User) AssignTeam(ctx context.Context, d db.DBTX, userID db.UserID, teamID db.TeamID) error
- func (u *User) ByAPIKey(ctx context.Context, d db.DBTX, apiKey string) (*db.User, error)
- func (u *User) ByEmail(ctx context.Context, d db.DBTX, email string) (*db.User, error)
- func (u *User) ByExternalID(ctx context.Context, d db.DBTX, id string) (*db.User, error)
- func (u *User) ByUsername(ctx context.Context, d db.DBTX, username string) (*db.User, error)
- func (u *User) CreateAPIKey(ctx context.Context, d db.DBTX, user *db.User) (*db.UserAPIKey, error)
- func (u *User) Delete(ctx context.Context, d db.DBTX, id db.UserID) (*db.User, error)
- func (u *User) LatestGlobalNotifications(ctx context.Context, d db.DBTX, userID db.UserID) ([]db.GetUserNotificationsRow, error)
- func (u *User) LatestPersonalNotifications(ctx context.Context, d db.DBTX, userID db.UserID) ([]db.UserNotification, error)
- func (u *User) Register(ctx context.Context, d db.DBTX, params UserRegisterParams) (*db.User, error)
- func (u *User) Update(ctx context.Context, d db.DBTX, id db.UserID, caller *db.User, ...) (*db.User, error)
- func (u *User) UpdateUserAuthorization(ctx context.Context, d db.DBTX, id db.UserID, caller *db.User, ...) (*db.User, error)
- type UserRegisterParams
- type WorkItem
- func (w *WorkItem) AssignTags(ctx context.Context, d db.DBTX, projectName models.Project, ...) error
- func (w *WorkItem) AssignUsers(ctx context.Context, d db.DBTX, workItem *db.WorkItem, members []Member) error
- func (w *WorkItem) RemoveAssignedUsers(ctx context.Context, d db.DBTX, workItem *db.WorkItem, members []db.UserID) error
- func (w *WorkItem) RemoveTags(ctx context.Context, d db.DBTX, workItem *db.WorkItem, ...) error
- type WorkItemTag
- func (wit *WorkItemTag) ByID(ctx context.Context, d db.DBTX, id db.WorkItemTagID) (*db.WorkItemTag, error)
- func (wit *WorkItemTag) ByName(ctx context.Context, d db.DBTX, name string, projectID db.ProjectID) (*db.WorkItemTag, error)
- func (wit *WorkItemTag) Create(ctx context.Context, d db.DBTX, caller *db.User, ...) (*db.WorkItemTag, error)
- func (wit *WorkItemTag) Delete(ctx context.Context, d db.DBTX, caller *db.User, id db.WorkItemTagID) (*db.WorkItemTag, error)
- func (wit *WorkItemTag) Update(ctx context.Context, d db.DBTX, caller *db.User, id db.WorkItemTagID, ...) (*db.WorkItemTag, error)
- type WorkItemType
Constants ¶
const OtelName = "github.com/danicc097/openapi-go-gin-postgres-sqlc/internal/services"
Variables ¶
This section is empty.
Functions ¶
func NewMovie ¶
func NewMovie(d db.DBTX, logger *zap.SugaredLogger, moviec tfidf.MovieGenreClient) *movie
NewMovie returns a new movie service. This is a sample service to showcase grpc + opentelemetry.
Types ¶
type Activity ¶
type Activity struct {
// contains filtered or unexported fields
}
func NewActivity ¶
func NewActivity(logger *zap.SugaredLogger, aRepo repos.Activity) *Activity
NewActivity returns a new Activity service.
func (*Activity) ByName ¶
func (a *Activity) ByName(ctx context.Context, d db.DBTX, name string, projectID db.ProjectID) (*db.Activity, error)
ByName gets an activity by name.
func (*Activity) ByProjectID ¶
func (a *Activity) ByProjectID(ctx context.Context, d db.DBTX, projectID db.ProjectID) ([]db.Activity, error)
ByProjectID gets activities by project ID.
func (*Activity) Create ¶
func (a *Activity) Create(ctx context.Context, d db.DBTX, params *db.ActivityCreateParams) (*db.Activity, error)
Create creates a new activity.
type Authentication ¶
type Authentication struct {
// contains filtered or unexported fields
}
func NewAuthentication ¶
func NewAuthentication(logger *zap.SugaredLogger, usvc *User, pool *pgxpool.Pool) *Authentication
NewAuthentication returns a new authentication service. TODO should we use tx instead of providing pool only.
func (*Authentication) CreateAPIKeyForUser ¶
func (a *Authentication) CreateAPIKeyForUser(ctx context.Context, user *db.User) (*db.UserAPIKey, error)
CreateAPIKeyForUser creates a new API key for a user.
func (*Authentication) CreateAccessTokenForUser ¶
func (a *Authentication) CreateAccessTokenForUser(ctx context.Context, user *db.User) (string, error)
CreateAccessTokenForUser creates a new token for a user.
func (*Authentication) GetOrRegisterUserFromUserInfo ¶
func (a *Authentication) GetOrRegisterUserFromUserInfo(ctx context.Context, userinfo oidc.UserInfo) (*db.User, error)
GetOrRegisterUserFromUserInfo returns a user from user info.
func (*Authentication) GetUserFromAPIKey ¶
GetUserFromAPIKey returns a user from an api key.
func (*Authentication) GetUserFromAccessToken ¶
func (a *Authentication) GetUserFromAccessToken(ctx context.Context, token string) (*db.User, error)
GetUserFromAccessToken returns a user from a token.
func (*Authentication) ParseToken ¶
ParseToken returns a token string claims.
type Authorization ¶
type Authorization struct {
// contains filtered or unexported fields
}
Authorization represents a service for authorization.
func NewAuthorization ¶
func NewAuthorization(logger *zap.SugaredLogger, scopePolicy string, rolePolicy string) (*Authorization, error)
NewAuthorization returns a new Authorization service. Existing roles and scopes will be loaded from the given policy JSON file paths.
func (*Authorization) DefaultScopes ¶
func (a *Authorization) DefaultScopes(role models.Role) models.Scopes
DefaultScopes returns the default scopes for a role. Scopes are assigned/revoked upon role change (reset completely).
func (*Authorization) HasRequiredRole ¶
func (a *Authorization) HasRequiredRole(role Role, requiredRole models.Role) error
func (*Authorization) HasRequiredScopes ¶
func (*Authorization) RoleByName ¶
func (a *Authorization) RoleByName(role models.Role) Role
func (*Authorization) RoleByRank ¶
func (a *Authorization) RoleByRank(rank int) (Role, bool)
func (*Authorization) ScopeByName ¶
func (a *Authorization) ScopeByName(scope string) (Scope, error)
type Board ¶
type Board struct {
// contains filtered or unexported fields
}
func NewBoard ¶
func NewBoard(logger *zap.SugaredLogger, projectRepo repos.Project, teamRepo repos.Team, workItemTagRepo repos.WorkItemTag, workItemTypeRepo repos.WorkItemType, authzsvc *Authorization, ) *Board
NewBoard returns a new Board service.
type DemoTwoWorkItem ¶
type DemoTwoWorkItem struct {
// contains filtered or unexported fields
}
func NewDemoTwoWorkItem ¶
func NewDemoTwoWorkItem(logger *zap.SugaredLogger, demowiRepo repos.DemoTwoWorkItem, wiRepo repos.WorkItem, userRepo repos.User, wiSvc *WorkItem) *DemoTwoWorkItem
NewDemoTwoWorkItem returns a new DemoTwoWorkItem service.
func (*DemoTwoWorkItem) AssignTag ¶
func (w *DemoTwoWorkItem) AssignTag(ctx context.Context, d db.DBTX, params *db.WorkItemWorkItemTagCreateParams) error
TODO: same as assign/remove members.
func (*DemoTwoWorkItem) ByID ¶
func (w *DemoTwoWorkItem) ByID(ctx context.Context, d db.DBTX, id db.WorkItemID) (*db.WorkItem, error)
ByID gets a work item by ID.
func (*DemoTwoWorkItem) Create ¶
func (w *DemoTwoWorkItem) Create(ctx context.Context, d db.DBTX, params DemoTwoWorkItemCreateParams) (*db.WorkItem, error)
Create creates a new work item.
func (*DemoTwoWorkItem) Delete ¶
func (w *DemoTwoWorkItem) Delete(ctx context.Context, d db.DBTX, id db.WorkItemID) (*db.WorkItem, error)
Delete deletes a work item by ID.
func (*DemoTwoWorkItem) ListDeleted ¶
func (*DemoTwoWorkItem) RemoveTag ¶
func (w *DemoTwoWorkItem) RemoveTag(ctx context.Context, d db.DBTX, tagID db.WorkItemTagID, workItemID db.WorkItemID) error
TODO: same as assign/remove members.
func (*DemoTwoWorkItem) Restore ¶
func (w *DemoTwoWorkItem) Restore(ctx context.Context, d db.DBTX, id db.WorkItemID) (*db.WorkItem, error)
func (*DemoTwoWorkItem) Update ¶
func (w *DemoTwoWorkItem) Update(ctx context.Context, d db.DBTX, id db.WorkItemID, params repos.DemoTwoWorkItemUpdateParams) (*db.WorkItem, error)
Update updates an existing work item.
type DemoTwoWorkItemCreateParams ¶
type DemoTwoWorkItemCreateParams struct { repos.DemoTwoWorkItemCreateParams TagIDs []db.WorkItemTagID `json:"tagIDs" nullable:"false" required:"true"` Members []Member `json:"members" nullable:"false" required:"true"` }
type DemoWorkItem ¶
type DemoWorkItem struct {
// contains filtered or unexported fields
}
func NewDemoWorkItem ¶
func NewDemoWorkItem(logger *zap.SugaredLogger, demowiRepo repos.DemoWorkItem, wiRepo repos.WorkItem, userRepo repos.User, wiSvc *WorkItem) *DemoWorkItem
NewDemoWorkItem returns a new DemoWorkItem service.
func (*DemoWorkItem) AssignTag ¶
func (w *DemoWorkItem) AssignTag(ctx context.Context, d db.DBTX, params *db.WorkItemWorkItemTagCreateParams) error
TODO: same as assign/remove members.
func (*DemoWorkItem) ByID ¶
func (w *DemoWorkItem) ByID(ctx context.Context, d db.DBTX, id db.WorkItemID) (*db.WorkItem, error)
ByID gets a work item by ID.
func (*DemoWorkItem) Create ¶
func (w *DemoWorkItem) Create(ctx context.Context, d db.DBTX, params DemoWorkItemCreateParams) (*db.WorkItem, error)
Create creates a new work item.
func (*DemoWorkItem) Delete ¶
func (w *DemoWorkItem) Delete(ctx context.Context, d db.DBTX, id db.WorkItemID) (*db.WorkItem, error)
Delete deletes a work item by ID.
func (*DemoWorkItem) ListDeleted ¶
func (*DemoWorkItem) RemoveTag ¶
func (w *DemoWorkItem) RemoveTag(ctx context.Context, d db.DBTX, tagID db.WorkItemTagID, workItemID db.WorkItemID) error
TODO: same as assign/remove members.
func (*DemoWorkItem) Restore ¶
func (w *DemoWorkItem) Restore(ctx context.Context, d db.DBTX, id db.WorkItemID) (*db.WorkItem, error)
func (*DemoWorkItem) Update ¶
func (w *DemoWorkItem) Update(ctx context.Context, d db.DBTX, id db.WorkItemID, params repos.DemoWorkItemUpdateParams) (*db.WorkItem, error)
Update updates an existing work item.
type DemoWorkItemCreateParams ¶
type DemoWorkItemCreateParams struct { repos.DemoWorkItemCreateParams TagIDs []db.WorkItemTagID `json:"tagIDs" nullable:"false" required:"true"` Members []Member `json:"members" nullable:"false" required:"true"` }
type KanbanStep ¶
type KanbanStep struct {
// contains filtered or unexported fields
}
func NewKanbanStep ¶
func NewKanbanStep(logger *zap.SugaredLogger, ksrepo repos.KanbanStep) *KanbanStep
NewKanbanStep returns a new KanbanStep service.
func (*KanbanStep) ByID ¶
func (ks *KanbanStep) ByID(ctx context.Context, d db.DBTX, id db.KanbanStepID) (*db.KanbanStep, error)
ByID gets a KanbanStep by ID.
type Member ¶
type Member struct { Role models.WorkItemRole `json:"role" ref:"#/components/schemas/WorkItemRole" required:"true"` UserID db.UserID `json:"userID" required:"true"` }
type Notification ¶
type Notification struct {
// contains filtered or unexported fields
}
func NewNotification ¶
func NewNotification(logger *zap.SugaredLogger, nrepo repos.Notification) *Notification
NewNotification returns a new Notification service.
func (*Notification) Create ¶
func (n *Notification) Create(ctx context.Context, d db.DBTX, params *db.NotificationCreateParams) (*db.Notification, error)
Create creates a new notification.
func (*Notification) LatestUserNotifications ¶
func (n *Notification) LatestUserNotifications(ctx context.Context, d db.DBTX, params *db.GetUserNotificationsParams) ([]db.GetUserNotificationsRow, error)
LatestUserNotifications gets user notifications ordered by creation date.
type Project ¶
type Project struct {
// contains filtered or unexported fields
}
func NewProject ¶
func NewProject(logger *zap.SugaredLogger, projectRepo repos.Project, teamRepo repos.Team, ) *Project
NewProject returns a new Project service.
func (*Project) MergeConfigFields ¶
func (p *Project) MergeConfigFields(ctx context.Context, d db.DBTX, projectName models.Project, update map[string]any) (*models.ProjectConfig, error)
obj1 : required existing database config update : config update object (we dont know any of those, just projectID) TODO call this for every project at app startup, therefore config is always up to date in the db. `update` will be empty in this first update. when a user updates the config in UI we use this same function but with empty [] of paths. merging logic is the same for both scenarios. we are not typing the update to save ourselves from manually adding a migration to change projects.board_config when _any_ field changes. we generate a new config the way it must be and merge with whatever was in db's board_config there at app startup. the endpoint to update it will be validated by openapi libs as usual.
type Role ¶
type Role struct { Description string `json:"description"` Rank int `json:"rank"` Name models.Role `json:"name"` }
Role represents a predefined role that may be required for specific actions regardless of scopes assigned to a user.
type Team ¶
type Team struct {
// contains filtered or unexported fields
}
func NewTeam ¶
func NewTeam(logger *zap.SugaredLogger, trepo repos.Team) *Team
NewTeam returns a new Team service.
func (*Team) ByName ¶
func (t *Team) ByName(ctx context.Context, d db.DBTX, name string, projectID db.ProjectID) (*db.Team, error)
ByName gets a team by name.
func (*Team) Create ¶
func (t *Team) Create(ctx context.Context, d db.DBTX, params *db.TeamCreateParams) (*db.Team, error)
Create creates a new team.
type TimeEntry ¶
type TimeEntry struct {
// contains filtered or unexported fields
}
func NewTimeEntry ¶
func NewTimeEntry(logger *zap.SugaredLogger, teRepo repos.TimeEntry, wiRepo repos.WorkItem) *TimeEntry
NewTimeEntry returns a new TimeEntry service.
func (*TimeEntry) Create ¶
func (a *TimeEntry) Create(ctx context.Context, d db.DBTX, caller *db.User, params *db.TimeEntryCreateParams) (*db.TimeEntry, error)
Create creates a new time entry.
type User ¶
type User struct {
// contains filtered or unexported fields
}
func NewUser ¶
func NewUser(logger *zap.SugaredLogger, urepo repos.User, notificationrepo repos.Notification, authzsvc *Authorization) *User
NewUser returns a new User service.
func (*User) AssignTeam ¶
func (*User) ByExternalID ¶
ByExternalID gets a user by ExternalID.
func (*User) ByUsername ¶
ByUsername gets a user by username.
func (*User) CreateAPIKey ¶
func (*User) LatestGlobalNotifications ¶
func (u *User) LatestGlobalNotifications(ctx context.Context, d db.DBTX, userID db.UserID) ([]db.GetUserNotificationsRow, error)
TODO.
func (*User) LatestPersonalNotifications ¶
func (u *User) LatestPersonalNotifications(ctx context.Context, d db.DBTX, userID db.UserID) ([]db.UserNotification, error)
TODO.
func (*User) Register ¶
func (u *User) Register(ctx context.Context, d db.DBTX, params UserRegisterParams) (*db.User, error)
Register registers a user.
type UserRegisterParams ¶
type UserRegisterParams struct { Username string Email string FirstName *string LastName *string ExternalID string Scopes []models.Scope Role models.Role }
NOTE: the most important distinction about repositories is that they represent collections of entities. They do not represent database storage or caching or any number of technical concerns. Repositories represent collections. How you hold those collections is simply an implementation detail. Repo should not be aware of models Role and Scope, its conversion or its default values. That's all for upper layers convenience. e.g roles: entity uses rank internally. Repo should not care about mappings to user-friendly names.
type WorkItem ¶
type WorkItem struct {
// contains filtered or unexported fields
}
func NewWorkItem ¶
func NewWorkItem(logger *zap.SugaredLogger, wiTagRepo repos.WorkItemTag, wiRepo repos.WorkItem, userRepo repos.User, projectRepo repos.Project) *WorkItem
NewWorkItem returns a new WorkItem service with common logic for all project workitems.
func (*WorkItem) AssignTags ¶
func (*WorkItem) AssignUsers ¶
func (*WorkItem) RemoveAssignedUsers ¶
type WorkItemTag ¶
type WorkItemTag struct {
// contains filtered or unexported fields
}
func NewWorkItemTag ¶
func NewWorkItemTag(logger *zap.SugaredLogger, witRepo repos.WorkItemTag) *WorkItemTag
NewWorkItemTag returns a new WorkItemTag service.
func (*WorkItemTag) ByID ¶
func (wit *WorkItemTag) ByID(ctx context.Context, d db.DBTX, id db.WorkItemTagID) (*db.WorkItemTag, error)
ByID gets a work item tag by ID.
func (*WorkItemTag) ByName ¶
func (wit *WorkItemTag) ByName(ctx context.Context, d db.DBTX, name string, projectID db.ProjectID) (*db.WorkItemTag, error)
ByName gets a work item tag by name.
func (*WorkItemTag) Create ¶
func (wit *WorkItemTag) Create(ctx context.Context, d db.DBTX, caller *db.User, params *db.WorkItemTagCreateParams) (*db.WorkItemTag, error)
Create creates a new work item tag.
func (*WorkItemTag) Delete ¶
func (wit *WorkItemTag) Delete(ctx context.Context, d db.DBTX, caller *db.User, id db.WorkItemTagID) (*db.WorkItemTag, error)
Delete deletes a work item tag by ID.
func (*WorkItemTag) Update ¶
func (wit *WorkItemTag) Update(ctx context.Context, d db.DBTX, caller *db.User, id db.WorkItemTagID, params *db.WorkItemTagUpdateParams) (*db.WorkItemTag, error)
Update updates an existing work item tag.
type WorkItemType ¶
type WorkItemType struct {
// contains filtered or unexported fields
}
func NewWorkItemType ¶
func NewWorkItemType(logger *zap.SugaredLogger, witRepo repos.WorkItemType) *WorkItemType
NewWorkItemType returns a new WorkItemType service.
func (*WorkItemType) ByID ¶
func (wit *WorkItemType) ByID(ctx context.Context, d db.DBTX, id db.WorkItemTypeID) (*db.WorkItemType, error)
ByID gets a work item type by ID.
Source Files ¶
- otel.go
- service_activity.go
- service_admin.go
- service_authentication.go
- service_authorization.go
- service_board.go
- service_kanban_step.go
- service_movie_grpc_demo.go
- service_notification.go
- service_project.go
- service_team.go
- service_time_entry.go
- service_user.go
- service_work_item.go
- service_work_item_project_demo.go
- service_work_item_project_demo_two.go
- service_work_item_tag.go
- service_work_item_type.go