Documentation ¶
Index ¶
- Constants
- func New(logger *zap.SugaredLogger) (*pgxpool.Pool, *sql.DB, error)
- 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 DemoTwoWorkItem
- func (u *DemoTwoWorkItem) ByID(ctx context.Context, d db.DBTX, id db.WorkItemID, ...) (*db.WorkItem, error)
- func (u *DemoTwoWorkItem) Create(ctx context.Context, d db.DBTX, params repos.DemoTwoWorkItemCreateParams) (*db.WorkItem, error)
- func (u *DemoTwoWorkItem) Update(ctx context.Context, d db.DBTX, id db.WorkItemID, ...) (*db.WorkItem, error)
- type DemoWorkItem
- func (u *DemoWorkItem) ByID(ctx context.Context, d db.DBTX, id db.WorkItemID, ...) (*db.WorkItem, error)
- func (u *DemoWorkItem) Create(ctx context.Context, d db.DBTX, params repos.DemoWorkItemCreateParams) (*db.WorkItem, error)
- func (u *DemoWorkItem) Update(ctx context.Context, d db.DBTX, id db.WorkItemID, ...) (*db.WorkItem, error)
- type KanbanStep
- type Notification
- func (u *Notification) Create(ctx context.Context, d db.DBTX, params *db.NotificationCreateParams) (*db.Notification, error)
- func (u *Notification) Delete(ctx context.Context, d db.DBTX, id db.NotificationID) (*db.Notification, error)
- func (u *Notification) LatestUserNotifications(ctx context.Context, d db.DBTX, params *db.GetUserNotificationsParams) ([]db.GetUserNotificationsRow, error)
- type Project
- func (u *Project) ByID(ctx context.Context, d db.DBTX, id db.ProjectID, ...) (*db.Project, error)
- func (u *Project) ByName(ctx context.Context, d db.DBTX, name models.Project, ...) (*db.Project, error)
- func (u *Project) UpdateBoardConfig(ctx context.Context, d db.DBTX, projectID db.ProjectID, paths []string, ...) error
- type QuerierWrapper
- func (w QuerierWrapper) GetUser(ctx context.Context, db db.DBTX, arg db.GetUserParams) (g1 db.GetUserRow, err error)
- func (w QuerierWrapper) GetUserNotifications(ctx context.Context, db db.DBTX, arg db.GetUserNotificationsParams) (ga1 []db.GetUserNotificationsRow, err error)
- func (w QuerierWrapper) RegisterNewUser(ctx context.Context, db db.DBTX, arg db.RegisterNewUserParams) (r1 db.RegisterNewUserRow, err error)
- func (w QuerierWrapper) Test(ctx context.Context, db db.DBTX) (err error)
- 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 (wit *TimeEntry) ByID(ctx context.Context, d db.DBTX, id db.TimeEntryID, ...) (*db.TimeEntry, error)
- func (wit *TimeEntry) Create(ctx context.Context, d db.DBTX, params *db.TimeEntryCreateParams) (*db.TimeEntry, error)
- func (wit *TimeEntry) Delete(ctx context.Context, d db.DBTX, id db.TimeEntryID) (*db.TimeEntry, error)
- func (wit *TimeEntry) Update(ctx context.Context, d db.DBTX, id db.TimeEntryID, ...) (*db.TimeEntry, error)
- type User
- 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, extID string, ...) (*db.User, error)
- func (u *User) ByID(ctx context.Context, d db.DBTX, id db.UserID, ...) (*db.User, error)
- func (u *User) ByProject(ctx context.Context, d db.DBTX, projectID db.ProjectID) ([]db.User, error)
- func (u *User) ByTeam(ctx context.Context, d db.DBTX, teamID db.TeamID) ([]db.User, error)
- func (u *User) ByUsername(ctx context.Context, d db.DBTX, username string, ...) (*db.User, error)
- func (u *User) Create(ctx context.Context, d db.DBTX, params *db.UserCreateParams) (*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) DeleteAPIKey(ctx context.Context, d db.DBTX, apiKey string) (*db.UserAPIKey, error)
- func (u *User) Update(ctx context.Context, d db.DBTX, id db.UserID, params *db.UserUpdateParams) (*db.User, error)
- type WorkItem
- func (w *WorkItem) AssignTag(ctx context.Context, d db.DBTX, params *db.WorkItemWorkItemTagCreateParams) error
- func (w *WorkItem) AssignUser(ctx context.Context, d db.DBTX, params *db.WorkItemAssignedUserCreateParams) error
- func (w *WorkItem) ByID(ctx context.Context, d db.DBTX, id db.WorkItemID, ...) (*db.WorkItem, error)
- func (w *WorkItem) Delete(ctx context.Context, d db.DBTX, id db.WorkItemID) (*db.WorkItem, error)
- func (w *WorkItem) RemoveAssignedUser(ctx context.Context, d db.DBTX, memberID db.UserID, workItemID db.WorkItemID) error
- func (w *WorkItem) RemoveTag(ctx context.Context, d db.DBTX, tagID db.WorkItemTagID, ...) error
- func (w *WorkItem) Restore(ctx context.Context, d db.DBTX, id db.WorkItemID) (*db.WorkItem, error)
- type WorkItemComment
- func (wit *WorkItemComment) ByID(ctx context.Context, d db.DBTX, id db.WorkItemCommentID, ...) (*db.WorkItemComment, error)
- func (wit *WorkItemComment) Create(ctx context.Context, d db.DBTX, params *db.WorkItemCommentCreateParams) (*db.WorkItemComment, error)
- func (wit *WorkItemComment) Delete(ctx context.Context, d db.DBTX, id db.WorkItemCommentID) (*db.WorkItemComment, error)
- func (wit *WorkItemComment) Update(ctx context.Context, d db.DBTX, id db.WorkItemCommentID, ...) (*db.WorkItemComment, 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, params *db.WorkItemTagCreateParams) (*db.WorkItemTag, error)
- func (wit *WorkItemTag) Delete(ctx context.Context, d db.DBTX, id db.WorkItemTagID) (*db.WorkItemTag, error)
- func (wit *WorkItemTag) Update(ctx context.Context, d db.DBTX, id db.WorkItemTagID, ...) (*db.WorkItemTag, error)
- type WorkItemType
Constants ¶
const OtelName = "github.com/danicc097/openapi-go-gin-postgres-sqlc/internal/repos/postgresql"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Activity ¶
type Activity struct {
// contains filtered or unexported fields
}
Activity represents the repository used for interacting with Activity records.
func (*Activity) ByProjectID ¶
type DemoTwoWorkItem ¶
type DemoTwoWorkItem struct {
// contains filtered or unexported fields
}
DemoTwoWorkItem represents the repository used for interacting with DemoTwoWorkItem records.
func NewDemoTwoWorkItem ¶
func NewDemoTwoWorkItem() *DemoTwoWorkItem
NewDemoTwoWorkItem instantiates the DemoTwoWorkItem repository.
func (*DemoTwoWorkItem) ByID ¶
func (u *DemoTwoWorkItem) ByID(ctx context.Context, d db.DBTX, id db.WorkItemID, opts ...db.WorkItemSelectConfigOption) (*db.WorkItem, error)
func (*DemoTwoWorkItem) Create ¶
func (u *DemoTwoWorkItem) Create(ctx context.Context, d db.DBTX, params repos.DemoTwoWorkItemCreateParams) (*db.WorkItem, error)
func (*DemoTwoWorkItem) Update ¶
func (u *DemoTwoWorkItem) Update(ctx context.Context, d db.DBTX, id db.WorkItemID, params repos.DemoTwoWorkItemUpdateParams) (*db.WorkItem, error)
type DemoWorkItem ¶
type DemoWorkItem struct {
// contains filtered or unexported fields
}
DemoWorkItem represents the repository used for interacting with DemoWorkItem records.
func NewDemoWorkItem ¶
func NewDemoWorkItem() *DemoWorkItem
NewDemoWorkItem instantiates the DemoWorkItem repository.
func (*DemoWorkItem) ByID ¶
func (u *DemoWorkItem) ByID(ctx context.Context, d db.DBTX, id db.WorkItemID, opts ...db.WorkItemSelectConfigOption) (*db.WorkItem, error)
func (*DemoWorkItem) Create ¶
func (u *DemoWorkItem) Create(ctx context.Context, d db.DBTX, params repos.DemoWorkItemCreateParams) (*db.WorkItem, error)
func (*DemoWorkItem) Update ¶
func (u *DemoWorkItem) Update(ctx context.Context, d db.DBTX, id db.WorkItemID, params repos.DemoWorkItemUpdateParams) (*db.WorkItem, error)
type KanbanStep ¶
type KanbanStep struct {
// contains filtered or unexported fields
}
KanbanStep represents the repository used for interacting with KanbanStep records.
func NewKanbanStep ¶
func NewKanbanStep() *KanbanStep
NewKanbanStep instantiates the KanbanStep repository.
func (*KanbanStep) ByID ¶
func (k *KanbanStep) ByID(ctx context.Context, d db.DBTX, id db.KanbanStepID, opts ...db.KanbanStepSelectConfigOption) (*db.KanbanStep, error)
func (*KanbanStep) ByProject ¶
func (k *KanbanStep) ByProject(ctx context.Context, d db.DBTX, projectID db.ProjectID, opts ...db.KanbanStepSelectConfigOption) ([]db.KanbanStep, error)
type Notification ¶
type Notification struct {
// contains filtered or unexported fields
}
Notification represents the repository used for interacting with Notification records.
func NewNotification ¶
func NewNotification() *Notification
NewNotification instantiates the Notification repository.
func (*Notification) Create ¶
func (u *Notification) Create(ctx context.Context, d db.DBTX, params *db.NotificationCreateParams) (*db.Notification, error)
func (*Notification) Delete ¶
func (u *Notification) Delete(ctx context.Context, d db.DBTX, id db.NotificationID) (*db.Notification, error)
func (*Notification) LatestUserNotifications ¶
func (u *Notification) LatestUserNotifications(ctx context.Context, d db.DBTX, params *db.GetUserNotificationsParams) ([]db.GetUserNotificationsRow, error)
type Project ¶
type Project struct {
// contains filtered or unexported fields
}
Project represents the repository used for interacting with Project records.
type QuerierWrapper ¶
QuerierWrapper implements db.Querier and wraps errors with the associated query name.
func NewQuerierWrapper ¶
func NewQuerierWrapper(base db.Querier) QuerierWrapper
NewQuerierWrapper returns QuerierWrapper with wrapped pgx errors.
func (QuerierWrapper) GetUser ¶
func (w QuerierWrapper) GetUser(ctx context.Context, db db.DBTX, arg db.GetUserParams) (g1 db.GetUserRow, err error)
func (QuerierWrapper) GetUserNotifications ¶
func (w QuerierWrapper) GetUserNotifications(ctx context.Context, db db.DBTX, arg db.GetUserNotificationsParams) (ga1 []db.GetUserNotificationsRow, err error)
func (QuerierWrapper) RegisterNewUser ¶
func (w QuerierWrapper) RegisterNewUser(ctx context.Context, db db.DBTX, arg db.RegisterNewUserParams) (r1 db.RegisterNewUserRow, err error)
type Team ¶
type Team struct {
// contains filtered or unexported fields
}
Team represents the repository used for interacting with Team records.
type TimeEntry ¶
type TimeEntry struct {
// contains filtered or unexported fields
}
TimeEntry represents the repository used for interacting with TimeEntry records.
func NewTimeEntry ¶
func NewTimeEntry() *TimeEntry
NewTimeEntry instantiates the TimeEntry repository.
type User ¶
type User struct {
// contains filtered or unexported fields
}
User represents the repository used for interacting with User records.
func (*User) ByExternalID ¶
func (*User) ByUsername ¶
func (*User) CreateAPIKey ¶
func (*User) DeleteAPIKey ¶
type WorkItem ¶
type WorkItem struct {
// contains filtered or unexported fields
}
WorkItem represents the repository used for interacting with WorkItem records.
func NewWorkItem ¶
func NewWorkItem() *WorkItem
NewWorkItem instantiates the WorkItem repository. NOTE: maybe we can consider work item an aggregate root, since we don't need distinction between projects for some tasks like assigning members, tags, generic functionality like Delete, Restore... and this simplifies everything a lot.
func (*WorkItem) AssignUser ¶
func (*WorkItem) RemoveAssignedUser ¶
type WorkItemComment ¶
type WorkItemComment struct {
// contains filtered or unexported fields
}
WorkItemComment represents the repository used for interacting with WorkItemComment records.
func NewWorkItemComment ¶
func NewWorkItemComment() *WorkItemComment
NewWorkItemComment instantiates the WorkItemComment repository.
func (*WorkItemComment) ByID ¶
func (wit *WorkItemComment) ByID(ctx context.Context, d db.DBTX, id db.WorkItemCommentID, opts ...db.WorkItemCommentSelectConfigOption) (*db.WorkItemComment, error)
func (*WorkItemComment) Create ¶
func (wit *WorkItemComment) Create(ctx context.Context, d db.DBTX, params *db.WorkItemCommentCreateParams) (*db.WorkItemComment, error)
func (*WorkItemComment) Delete ¶
func (wit *WorkItemComment) Delete(ctx context.Context, d db.DBTX, id db.WorkItemCommentID) (*db.WorkItemComment, error)
func (*WorkItemComment) Update ¶
func (wit *WorkItemComment) Update(ctx context.Context, d db.DBTX, id db.WorkItemCommentID, params *db.WorkItemCommentUpdateParams) (*db.WorkItemComment, error)
type WorkItemTag ¶
type WorkItemTag struct {
// contains filtered or unexported fields
}
WorkItemTag represents the repository used for interacting with WorkItemTag records.
func NewWorkItemTag ¶
func NewWorkItemTag() *WorkItemTag
NewWorkItemTag instantiates the WorkItemTag repository.
func (*WorkItemTag) ByID ¶
func (wit *WorkItemTag) ByID(ctx context.Context, d db.DBTX, id db.WorkItemTagID, opts ...db.WorkItemTagSelectConfigOption) (*db.WorkItemTag, error)
func (*WorkItemTag) ByName ¶
func (wit *WorkItemTag) ByName(ctx context.Context, d db.DBTX, name string, projectID db.ProjectID, opts ...db.WorkItemTagSelectConfigOption) (*db.WorkItemTag, error)
func (*WorkItemTag) Create ¶
func (wit *WorkItemTag) Create(ctx context.Context, d db.DBTX, params *db.WorkItemTagCreateParams) (*db.WorkItemTag, error)
func (*WorkItemTag) Delete ¶
func (wit *WorkItemTag) Delete(ctx context.Context, d db.DBTX, id db.WorkItemTagID) (*db.WorkItemTag, error)
func (*WorkItemTag) Update ¶
func (wit *WorkItemTag) Update(ctx context.Context, d db.DBTX, id db.WorkItemTagID, params *db.WorkItemTagUpdateParams) (*db.WorkItemTag, error)
type WorkItemType ¶
type WorkItemType struct {
// contains filtered or unexported fields
}
WorkItemType represents the repository used for interacting with WorkItemType records.
func NewWorkItemType ¶
func NewWorkItemType() *WorkItemType
NewWorkItemType instantiates the WorkItemType repository.
func (*WorkItemType) ByID ¶
func (wit *WorkItemType) ByID(ctx context.Context, d db.DBTX, id db.WorkItemTypeID, opts ...db.WorkItemTypeSelectConfigOption) (*db.WorkItemType, error)
func (*WorkItemType) ByName ¶
func (wit *WorkItemType) ByName(ctx context.Context, d db.DBTX, name string, projectID db.ProjectID, opts ...db.WorkItemTypeSelectConfigOption) (*db.WorkItemType, error)
Source Files ¶
- errors.go
- otel.go
- postgresql.go
- repo_activity.go
- repo_kanban_step.go
- repo_notifications.go
- repo_project.go
- repo_team.go
- repo_time_entry.go
- repo_user.go
- repo_work_item.go
- repo_work_item_comment.go
- repo_work_item_project_demo.go
- repo_work_item_project_demo_two.go
- repo_work_item_tag.go
- repo_work_item_type.go
- sqlc_querier_wrapper.gen.go
- struct_mapper.go