Documentation
¶
Index ¶
- func AsText(s string) pgtype.Text
- type ChangePasswordParams
- type CreateSnippetParams
- type CreateUserParams
- type DBTX
- type Queries
- func (q *Queries) ChangePassword(ctx context.Context, arg ChangePasswordParams) error
- func (q *Queries) CreateSnippet(ctx context.Context, arg CreateSnippetParams) (Snippet, error)
- func (q *Queries) CreateUser(ctx context.Context, arg CreateUserParams) (User, error)
- func (q *Queries) DeleteSnippet(ctx context.Context, snippetID string) error
- func (q *Queries) DeleteUser(ctx context.Context, userID string) error
- func (q *Queries) GetSnippet(ctx context.Context, snippetID string) (Snippet, error)
- func (q *Queries) GetUser(ctx context.Context, userID string) (User, error)
- func (q *Queries) GetUserByEmail(ctx context.Context, email pgtype.Text) (User, error)
- func (q *Queries) ListLatestSnippets(ctx context.Context) ([]Snippet, error)
- func (q *Queries) ListSnippets(ctx context.Context) ([]Snippet, error)
- func (q *Queries) ListUsers(ctx context.Context) ([]User, error)
- func (q *Queries) UpdateSnippet(ctx context.Context, arg UpdateSnippetParams) error
- func (q *Queries) UpdateUser(ctx context.Context, arg UpdateUserParams) error
- func (q *Queries) WithTx(tx pgx.Tx) *Queries
- type Snippet
- type UpdateSnippetParams
- type UpdateUserParams
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ChangePasswordParams ¶
func GetChangePasswordParams ¶
func GetChangePasswordParams(hash, uid string) ChangePasswordParams
type CreateSnippetParams ¶
type CreateSnippetParams struct {
SnippetID string
Title pgtype.Text
Content pgtype.Text
DateExpires pgtype.Timestamptz
DateCreated pgtype.Timestamptz
DateUpdated pgtype.Timestamptz
}
func GetCreateSnippetParams ¶
func GetCreateSnippetParams(id, title, content string, exp, create, up time.Time) CreateSnippetParams
type CreateUserParams ¶
type CreateUserParams struct {
UserID string
Name pgtype.Text
Email pgtype.Text
Active pgtype.Bool
PasswordHash pgtype.Text
Roles []string
DateCreated pgtype.Timestamptz
DateUpdated pgtype.Timestamptz
}
func GetCreateUserParams ¶
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) ChangePassword ¶
func (q *Queries) ChangePassword(ctx context.Context, arg ChangePasswordParams) error
func (*Queries) CreateSnippet ¶
func (*Queries) CreateUser ¶
func (*Queries) DeleteSnippet ¶
func (*Queries) GetSnippet ¶
func (*Queries) GetUserByEmail ¶
func (*Queries) ListLatestSnippets ¶
func (*Queries) ListSnippets ¶
func (*Queries) UpdateSnippet ¶
func (q *Queries) UpdateSnippet(ctx context.Context, arg UpdateSnippetParams) error
func (*Queries) UpdateUser ¶
func (q *Queries) UpdateUser(ctx context.Context, arg UpdateUserParams) error
type Snippet ¶
type Snippet struct {
SnippetID string
Title pgtype.Text
Content pgtype.Text
DateExpires pgtype.Timestamptz
DateCreated pgtype.Timestamptz
DateUpdated pgtype.Timestamptz
}
type UpdateSnippetParams ¶
type UpdateSnippetParams struct {
SnippetID string
Title pgtype.Text
Content pgtype.Text
DateExpires pgtype.Timestamptz
DateUpdated pgtype.Timestamptz
}
func GetUpdateSnippetParams ¶
func GetUpdateSnippetParams(id, title, content string, exp, up time.Time) UpdateSnippetParams
type UpdateUserParams ¶
type UpdateUserParams struct {
UserID string
Name pgtype.Text
Email pgtype.Text
Roles []string
PasswordHash pgtype.Text
DateUpdated pgtype.Timestamptz
}
func GetUpdateUserParams ¶
Click to show internal directories.
Click to hide internal directories.