sqlc

package
v0.0.0-...-d215556 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 6, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package sqlc contains auto-generated SQL bindings. Do not manually edit anything within this package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	UserID     int32
	Provider   string
	ProviderID string
}

type AccountCache

type AccountCache struct {
	ID         pgtype.UUID
	Name       *string
	Email      *string
	Provider   string
	ProviderID string
	Created    pgtype.Timestamptz
}

type AddUserToPermissionGroupForOrganisationParams

type AddUserToPermissionGroupForOrganisationParams struct {
	PermissionGroupID int32
	UserID            int32
	OrganisationID    int32
}

type Address

type Address struct {
	ID         int32
	Street     string
	Number     string
	PostalCode string
	City       string
	Country    string
	ExtraLine  *string
}

type CreateAccountCacheParams

type CreateAccountCacheParams struct {
	Name       *string
	Email      *string
	Provider   string
	ProviderID string
}

type CreateAccountParams

type CreateAccountParams struct {
	UserID     int32
	Provider   string
	ProviderID string
}

type CreateAddressParams

type CreateAddressParams struct {
	Street     string
	Number     string
	ExtraLine  *string
	PostalCode string
	City       string
	Country    string
}

type CreatePermissionGroupPermissionParams

type CreatePermissionGroupPermissionParams struct {
	GroupID    int32
	Permission string
	Enabled    bool
}

type CreateUserParams

type CreateUserParams struct {
	Name  string
	Email string
	Lang  string
}

type DBTX

type DBTX interface {
	Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error)
	Query(context.Context, string, ...interface{}) (pgx.Rows, error)
	QueryRow(context.Context, string, ...interface{}) pgx.Row
}

type GetPermissionsForGroupRow

type GetPermissionsForGroupRow struct {
	Permission string
	Enabled    bool
}

type Organisation

type Organisation struct {
	ID       int32
	Name     string
	ParentID *int32
}

type OrganisationUser

type OrganisationUser struct {
	ID             int32
	UserID         int32
	OrganisationID int32
}

type OrganisationUsersPermissiongroup

type OrganisationUsersPermissiongroup struct {
	OrganisationUsersID int32
	PermissionGroupID   int32
}

type Permission

type Permission struct {
	Name string
}

type Permissiongroup

type Permissiongroup struct {
	ID   int32
	Name *string
}

type PermissiongroupPermission

type PermissiongroupPermission struct {
	GroupID    int32
	Permission string
	Enabled    bool
}

type Queries

type Queries struct {
	// contains filtered or unexported fields
}

func New

func New(db DBTX) *Queries

func (*Queries) AddUserToOrganisation

func (q *Queries) AddUserToOrganisation(ctx context.Context, userID int32, organisationID int32) error

func (*Queries) AddUserToPermissionGroup

func (q *Queries) AddUserToPermissionGroup(ctx context.Context, groupID int32, userID int32) error

func (*Queries) AddUserToPermissionGroupForOrganisation

func (q *Queries) AddUserToPermissionGroupForOrganisation(ctx context.Context, arg AddUserToPermissionGroupForOrganisationParams) error

func (*Queries) CreateAccount

func (q *Queries) CreateAccount(ctx context.Context, arg CreateAccountParams) (Account, error)

func (*Queries) CreateAccountCache

func (q *Queries) CreateAccountCache(ctx context.Context, arg CreateAccountCacheParams) (AccountCache, error)

func (*Queries) CreateAddress

func (q *Queries) CreateAddress(ctx context.Context, arg CreateAddressParams) (Address, error)

func (*Queries) CreateOrganisation

func (q *Queries) CreateOrganisation(ctx context.Context, name string, parentID *int32) (Organisation, error)

func (*Queries) CreatePermission

func (q *Queries) CreatePermission(ctx context.Context, name string) error

func (*Queries) CreatePermissionGroup

func (q *Queries) CreatePermissionGroup(ctx context.Context, name *string) (Permissiongroup, error)

func (*Queries) CreatePermissionGroupPermission

func (q *Queries) CreatePermissionGroupPermission(ctx context.Context, arg CreatePermissionGroupPermissionParams) error

func (*Queries) CreatePermissionGroupWithID

func (q *Queries) CreatePermissionGroupWithID(ctx context.Context, iD int32, name *string) (Permissiongroup, error)

func (*Queries) CreateUser

func (q *Queries) CreateUser(ctx context.Context, arg CreateUserParams) (User, error)

func (*Queries) DeleteAccount

func (q *Queries) DeleteAccount(ctx context.Context, provider string, providerID string) error

func (*Queries) DeleteAccountCache

func (q *Queries) DeleteAccountCache(ctx context.Context, id pgtype.UUID) error

func (*Queries) DeleteAccountCacheOldEntries

func (q *Queries) DeleteAccountCacheOldEntries(ctx context.Context, dollar_1 pgtype.Interval) error

func (*Queries) DeleteAddress

func (q *Queries) DeleteAddress(ctx context.Context, id int32) error

func (*Queries) DeleteOrganisation

func (q *Queries) DeleteOrganisation(ctx context.Context, id int32) error

func (*Queries) DeletePermissionGroup

func (q *Queries) DeletePermissionGroup(ctx context.Context, id int32) error

func (*Queries) DeleteUser

func (q *Queries) DeleteUser(ctx context.Context, id int32) error

func (*Queries) GetAccountCacheForID

func (q *Queries) GetAccountCacheForID(ctx context.Context, id pgtype.UUID) (AccountCache, error)

func (*Queries) GetAddress

func (q *Queries) GetAddress(ctx context.Context, id int32) (Address, error)

func (*Queries) GetAmountOfOrganisations

func (q *Queries) GetAmountOfOrganisations(ctx context.Context) (int64, error)

func (*Queries) GetAmountOfUsers

func (q *Queries) GetAmountOfUsers(ctx context.Context) (int64, error)

func (*Queries) GetMemberByEmail

func (q *Queries) GetMemberByEmail(ctx context.Context, organisationID int32, email string) (User, error)

func (*Queries) GetOrganisation

func (q *Queries) GetOrganisation(ctx context.Context, id int32) (Organisation, error)

func (*Queries) GetParentOrganisation

func (q *Queries) GetParentOrganisation(ctx context.Context, id int32) (*int32, error)

func (*Queries) GetPermissionGroup

func (q *Queries) GetPermissionGroup(ctx context.Context, id int32) (Permissiongroup, error)

func (*Queries) GetPermissionsForGroup

func (q *Queries) GetPermissionsForGroup(ctx context.Context, groupID int32) ([]GetPermissionsForGroupRow, error)

func (*Queries) GetUser

func (q *Queries) GetUser(ctx context.Context, id int32) (User, error)

func (*Queries) GetUserForProvider

func (q *Queries) GetUserForProvider(ctx context.Context, provider string, providerID string) (User, error)

func (*Queries) ListAddresses

func (q *Queries) ListAddresses(ctx context.Context) ([]Address, error)

func (*Queries) ListOrganisationChildren

func (q *Queries) ListOrganisationChildren(ctx context.Context, parentID *int32) ([]Organisation, error)

func (*Queries) ListOrganisations

func (q *Queries) ListOrganisations(ctx context.Context) ([]Organisation, error)

func (*Queries) ListOrganisationsForUser

func (q *Queries) ListOrganisationsForUser(ctx context.Context, userID int32) ([]Organisation, error)

func (*Queries) ListPermissionGroups

func (q *Queries) ListPermissionGroups(ctx context.Context) ([]Permissiongroup, error)

func (*Queries) ListPermissionGroupsForUser

func (q *Queries) ListPermissionGroupsForUser(ctx context.Context, userID int32) ([]Permissiongroup, error)

func (*Queries) ListPermissionGroupsForUserForOrganisation

func (q *Queries) ListPermissionGroupsForUserForOrganisation(ctx context.Context, userID int32, organisationID int32) ([]Permissiongroup, error)

func (*Queries) ListPermissions

func (q *Queries) ListPermissions(ctx context.Context) ([]string, error)

func (*Queries) ListUsers

func (q *Queries) ListUsers(ctx context.Context) ([]User, error)

func (*Queries) ListUsersInOrganisation

func (q *Queries) ListUsersInOrganisation(ctx context.Context, organisationID int32) ([]User, error)

func (*Queries) RemoveUserFromOrganisation

func (q *Queries) RemoveUserFromOrganisation(ctx context.Context, userID int32, organisationID int32) error

func (*Queries) RenamePermissionGroup

func (q *Queries) RenamePermissionGroup(ctx context.Context, iD int32, name *string) error

func (*Queries) UpdateAddress

func (q *Queries) UpdateAddress(ctx context.Context, arg UpdateAddressParams) (Address, error)

func (*Queries) UpdateOrganisation

func (q *Queries) UpdateOrganisation(ctx context.Context, iD int32, name string) (Organisation, error)

func (*Queries) UpdatePermissionGroupIndex

func (q *Queries) UpdatePermissionGroupIndex(ctx context.Context) error

func (*Queries) UpdatePermissionGroupPermission

func (q *Queries) UpdatePermissionGroupPermission(ctx context.Context, arg UpdatePermissionGroupPermissionParams) error

func (*Queries) UpdateUser

func (q *Queries) UpdateUser(ctx context.Context, arg UpdateUserParams) (User, error)

func (*Queries) UpdateUserAdmin

func (q *Queries) UpdateUserAdmin(ctx context.Context, iD int32, admin bool) error

func (*Queries) WithTx

func (q *Queries) WithTx(tx pgx.Tx) *Queries

type UpdateAddressParams

type UpdateAddressParams struct {
	ID         int32
	Street     *string
	Number     *string
	ExtraLine  *string
	PostalCode *string
	City       *string
	Country    *string
}

type UpdatePermissionGroupPermissionParams

type UpdatePermissionGroupPermissionParams struct {
	GroupID    int32
	Permission string
	Enabled    bool
}

type UpdateUserParams

type UpdateUserParams struct {
	ID    int32
	Name  *string
	Email *string
	Lang  *string
}

type User

type User struct {
	ID     int32
	Name   string
	Email  string
	Joined pgtype.Timestamptz
	Admin  bool
	Lang   string
}

type UserPermissiongroupMembership

type UserPermissiongroupMembership struct {
	GroupID int32
	UserID  int32
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL