Documentation
¶
Index ¶
- type Activity
- type DemoTwoWorkItem
- type DemoTwoWorkItemCreateParams
- type DemoTwoWorkItemUpdateParams
- type DemoWorkItem
- type DemoWorkItemCreateParams
- type DemoWorkItemUpdateParams
- type GetPaginatedUsersParams
- type KanbanStep
- type Notification
- type Project
- type Repos
- type Team
- type TimeEntry
- type User
- type WorkItem
- type WorkItemComment
- type WorkItemTag
- type WorkItemType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Activity ¶
type Activity interface { ByID(ctx context.Context, d models.DBTX, id models.ActivityID, opts ...models.ActivitySelectConfigOption) (*models.Activity, error) ByName(ctx context.Context, d models.DBTX, name string, projectID models.ProjectID, opts ...models.ActivitySelectConfigOption) (*models.Activity, error) ByProjectID(ctx context.Context, d models.DBTX, projectID models.ProjectID, opts ...models.ActivitySelectConfigOption) ([]models.Activity, error) Create(ctx context.Context, d models.DBTX, params *models.ActivityCreateParams) (*models.Activity, error) Update(ctx context.Context, d models.DBTX, id models.ActivityID, params *models.ActivityUpdateParams) (*models.Activity, error) Delete(ctx context.Context, d models.DBTX, id models.ActivityID) (*models.Activity, error) Restore(ctx context.Context, d models.DBTX, id models.ActivityID) error }
Activity defines the datastore/repository handling persisting Activity records.
type DemoTwoWorkItem ¶
type DemoTwoWorkItem interface { // ByID returns a generic WorkItem with project-specific fields joined by default. ByID(ctx context.Context, d models.DBTX, id models.WorkItemID, opts ...models.WorkItemSelectConfigOption) (*models.WorkItem, error) Create(ctx context.Context, d models.DBTX, params DemoTwoWorkItemCreateParams) (*models.WorkItem, error) Update(ctx context.Context, d models.DBTX, id models.WorkItemID, params DemoTwoWorkItemUpdateParams) (*models.WorkItem, error) }
DemoTwoWorkItem defines the datastore/repository handling persisting DemoTwoWorkItem records.
type DemoTwoWorkItemCreateParams ¶
type DemoTwoWorkItemCreateParams struct { DemoTwoProject models.DemoTwoWorkItemCreateParams `json:"demoTwoProject" required:"true"` Base models.WorkItemCreateParams `json:"base" required:"true"` }
type DemoTwoWorkItemUpdateParams ¶
type DemoTwoWorkItemUpdateParams struct { DemoTwoProject *models.DemoTwoWorkItemUpdateParams `json:"demoTwoProject"` Base *models.WorkItemUpdateParams `json:"base"` }
type DemoWorkItem ¶
type DemoWorkItem interface { // ByID returns a generic WorkItem with project-specific fields joined by default. ByID(ctx context.Context, d models.DBTX, id models.WorkItemID, opts ...models.WorkItemSelectConfigOption) (*models.WorkItem, error) Paginated(ctx context.Context, d models.DBTX, cursor models.WorkItemID, opts ...models.CacheDemoWorkItemSelectConfigOption) ([]models.CacheDemoWorkItem, error) // params for dedicated workItem only require workItemID (FK-as-PK) Create(ctx context.Context, d models.DBTX, params DemoWorkItemCreateParams) (*models.WorkItem, error) Update(ctx context.Context, d models.DBTX, id models.WorkItemID, params DemoWorkItemUpdateParams) (*models.WorkItem, error) }
DemoWorkItem defines the datastore/repository handling persisting DemoWorkItem records.
type DemoWorkItemCreateParams ¶
type DemoWorkItemCreateParams struct { DemoProject models.DemoWorkItemCreateParams `json:"demoProject" required:"true"` Base models.WorkItemCreateParams `json:"base" required:"true"` }
type DemoWorkItemUpdateParams ¶
type DemoWorkItemUpdateParams struct { DemoProject *models.DemoWorkItemUpdateParams `json:"demoProject"` Base *models.WorkItemUpdateParams `json:"base"` }
type GetPaginatedUsersParams ¶
type GetPaginatedUsersParams struct { Limit int Direction models.Direction Cursor models.PaginationCursor Items *models.PaginationItems RoleRank *int }
type KanbanStep ¶
type KanbanStep interface { ByID(ctx context.Context, d models.DBTX, id models.KanbanStepID, opts ...models.KanbanStepSelectConfigOption) (*models.KanbanStep, error) ByProject(ctx context.Context, d models.DBTX, projectID models.ProjectID, opts ...models.KanbanStepSelectConfigOption) ([]models.KanbanStep, error) }
KanbanStep defines the datastore/repository handling persisting KanbanStep records. NOTE: Read-only. Managed via migrations.
type Notification ¶
type Notification interface { // now can replace GetUserNotifications with `...WithFilters`, in lieu of sqlc LatestNotifications(ctx context.Context, d models.DBTX, params *models.GetUserNotificationsParams) ([]models.GetUserNotificationsRow, error) PaginatedUserNotifications(ctx context.Context, d models.DBTX, userID models.UserID, params models.GetPaginatedNotificationsParams) ([]models.UserNotification, error) Create(ctx context.Context, d models.DBTX, params *models.NotificationCreateParams) (*models.UserNotification, error) Delete(ctx context.Context, d models.DBTX, id models.NotificationID) (*models.Notification, error) }
Notification defines the datastore/repository handling persisting Notification records.
type Project ¶
type Project interface { ByName(ctx context.Context, d models.DBTX, name models.ProjectName, opts ...models.ProjectSelectConfigOption) (*models.Project, error) ByID(ctx context.Context, d models.DBTX, id models.ProjectID, opts ...models.ProjectSelectConfigOption) (*models.Project, error) IsTeamInProject(ctx context.Context, d models.DBTX, arg models.IsTeamInProjectParams) (bool, error) }
Project defines the datastore/repository handling persisting Project records. Projects are manually created on demand. NOTE: Read-only. Managed via migrations.
type Repos ¶
type Repos struct { Activity Activity DemoTwoWorkItem DemoTwoWorkItem DemoWorkItem DemoWorkItem KanbanStep KanbanStep Notification Notification Project Project Team Team TimeEntry TimeEntry User User WorkItem WorkItem WorkItemComment WorkItemComment WorkItemTag WorkItemTag WorkItemType WorkItemType }
type Team ¶
type Team interface { ByID(ctx context.Context, d models.DBTX, id models.TeamID, opts ...models.TeamSelectConfigOption) (*models.Team, error) ByName(ctx context.Context, d models.DBTX, name string, projectID models.ProjectID, opts ...models.TeamSelectConfigOption) (*models.Team, error) Create(ctx context.Context, d models.DBTX, params *models.TeamCreateParams) (*models.Team, error) Update(ctx context.Context, d models.DBTX, id models.TeamID, params *models.TeamUpdateParams) (*models.Team, error) Delete(ctx context.Context, d models.DBTX, id models.TeamID) (*models.Team, error) }
Team defines the datastore/repository handling persisting Team records.
type TimeEntry ¶
type TimeEntry interface { ByID(ctx context.Context, d models.DBTX, id models.TimeEntryID, opts ...models.TimeEntrySelectConfigOption) (*models.TimeEntry, error) Create(ctx context.Context, d models.DBTX, params *models.TimeEntryCreateParams) (*models.TimeEntry, error) Update(ctx context.Context, d models.DBTX, id models.TimeEntryID, params *models.TimeEntryUpdateParams) (*models.TimeEntry, error) Delete(ctx context.Context, d models.DBTX, id models.TimeEntryID) (*models.TimeEntry, error) }
TimeEntry defines the datastore/repository handling persisting TimeEntry records.
type User ¶
type User interface { ByID(ctx context.Context, d models.DBTX, id models.UserID, opts ...models.UserSelectConfigOption) (*models.User, error) ByTeam(ctx context.Context, d models.DBTX, teamID models.TeamID) ([]models.User, error) ByProject(ctx context.Context, d models.DBTX, projectID models.ProjectID) ([]models.User, error) ByEmail(ctx context.Context, d models.DBTX, email string, opts ...models.UserSelectConfigOption) (*models.User, error) ByUsername(ctx context.Context, d models.DBTX, username string, opts ...models.UserSelectConfigOption) (*models.User, error) ByExternalID(ctx context.Context, d models.DBTX, extID string, opts ...models.UserSelectConfigOption) (*models.User, error) ByAPIKey(ctx context.Context, d models.DBTX, apiKey string) (*models.User, error) Paginated(ctx context.Context, d models.DBTX, params GetPaginatedUsersParams) ([]models.User, error) Create(ctx context.Context, d models.DBTX, params *models.UserCreateParams) (*models.User, error) Update(ctx context.Context, d models.DBTX, id models.UserID, params *models.UserUpdateParams) (*models.User, error) Delete(ctx context.Context, d models.DBTX, id models.UserID) (*models.User, error) // CreateAPIKey requires an existing user. CreateAPIKey(ctx context.Context, d models.DBTX, user *models.User) (*models.UserAPIKey, error) DeleteAPIKey(ctx context.Context, d models.DBTX, apiKey string) (*models.UserAPIKey, error) }
User defines the datastore/repository handling persisting User records.
type WorkItem ¶
type WorkItem interface { // ByID returns a generic WorkItem by default. ByID(ctx context.Context, d models.DBTX, id models.WorkItemID, opts ...models.WorkItemSelectConfigOption) (*models.WorkItem, error) Delete(ctx context.Context, d models.DBTX, id models.WorkItemID) (*models.WorkItem, error) Restore(ctx context.Context, d models.DBTX, id models.WorkItemID) (*models.WorkItem, error) AssignUser(ctx context.Context, d models.DBTX, params *models.WorkItemAssigneeCreateParams) error RemoveAssignedUser(ctx context.Context, d models.DBTX, memberID models.UserID, workItemID models.WorkItemID) error AssignTag(ctx context.Context, d models.DBTX, params *models.WorkItemWorkItemTagCreateParams) error RemoveTag(ctx context.Context, d models.DBTX, tagID models.WorkItemTagID, workItemID models.WorkItemID) error }
WorkItem defines the datastore/repository handling retrieving WorkItem records.
type WorkItemComment ¶
type WorkItemComment interface { ByID(ctx context.Context, d models.DBTX, id models.WorkItemCommentID, opts ...models.WorkItemCommentSelectConfigOption) (*models.WorkItemComment, error) Create(ctx context.Context, d models.DBTX, params *models.WorkItemCommentCreateParams) (*models.WorkItemComment, error) Update(ctx context.Context, d models.DBTX, id models.WorkItemCommentID, params *models.WorkItemCommentUpdateParams) (*models.WorkItemComment, error) Delete(ctx context.Context, d models.DBTX, id models.WorkItemCommentID) (*models.WorkItemComment, error) }
WorkItemComment defines the datastore/repository handling persisting work item comment records.
type WorkItemTag ¶
type WorkItemTag interface { ByID(ctx context.Context, d models.DBTX, id models.WorkItemTagID, opts ...models.WorkItemTagSelectConfigOption) (*models.WorkItemTag, error) // TODO ByProjectID(ctx context.Context, d db.DBTX, id db.WorkItemTagID) ([]*db.WorkItemTag, error) ByName(ctx context.Context, d models.DBTX, name string, projectID models.ProjectID, opts ...models.WorkItemTagSelectConfigOption) (*models.WorkItemTag, error) Create(ctx context.Context, d models.DBTX, params *models.WorkItemTagCreateParams) (*models.WorkItemTag, error) Update(ctx context.Context, d models.DBTX, id models.WorkItemTagID, params *models.WorkItemTagUpdateParams) (*models.WorkItemTag, error) Delete(ctx context.Context, d models.DBTX, id models.WorkItemTagID) (*models.WorkItemTag, error) }
WorkItemTag defines the datastore/repository handling persisting WorkItemTag records.
type WorkItemType ¶
type WorkItemType interface { ByID(ctx context.Context, d models.DBTX, id models.WorkItemTypeID, opts ...models.WorkItemTypeSelectConfigOption) (*models.WorkItemType, error) // TODO ByProjectID(ctx context.Context, d db.DBTX, id int) ([]*db.WorkItemType, error) ByName(ctx context.Context, d models.DBTX, name string, projectID models.ProjectID, opts ...models.WorkItemTypeSelectConfigOption) (*models.WorkItemType, error) }
WorkItemType defines the datastore/repository handling persisting WorkItemType records. NOTE: Read-only. Managed via migrations.
Directories
¶
Path | Synopsis |
---|---|
gen/models
Package models provides primitives to interact with the openapi HTTP API.
|
Package models provides primitives to interact with the openapi HTTP API. |
Code generated by counterfeiter.
|
Code generated by counterfeiter. |