queries

package
v0.0.0-...-b7aaf62 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2023 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddOrganizationMemberParams

type AddOrganizationMemberParams struct {
	UserID *int32 `json:"-"`
	OrgID  *int32 `json:"-"`
}

type ApiKey

type ApiKey struct {
	Uuid           string     `json:"uuid"`
	ID             *int32     `json:"-"`
	Name           string     `json:"name"`
	ApiKey         string     `json:"api_key"`
	AllowedDomains []string   `json:"allowed_domains"`
	OrgID          *int32     `json:"-"`
	UserID         *int32     `json:"-"`
	CreatedAt      *time.Time `json:"created_at"`
}

type CreateAPIKeyParams

type CreateAPIKeyParams struct {
	Name           string   `json:"name"`
	ApiKey         string   `json:"api_key"`
	AllowedDomains []string `json:"allowed_domains"`
	OrgID          *int32   `json:"-"`
	UserID         *int32   `json:"-"`
}

type CreateActiveUserParams

type CreateActiveUserParams struct {
	Name     string `json:"name"`
	Email    string `json:"email"`
	Password string `json:"-"`
}

type CreateFlagsGroupParams

type CreateFlagsGroupParams struct {
	Name     string `json:"name"`
	OrgID    *int32 `json:"-"`
	FolderID *int32 `json:"-"`
}

type CreateFolderParams

type CreateFolderParams struct {
	Name  string `json:"name"`
	OrgID *int32 `json:"-"`
}

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 FlagsGroup

type FlagsGroup struct {
	Uuid      string     `json:"uuid"`
	ID        *int32     `json:"-"`
	Name      string     `json:"name"`
	OrgID     *int32     `json:"-"`
	FolderID  *int32     `json:"-"`
	CreatedAt *time.Time `json:"created_at"`
}

type FlagsGroupState

type FlagsGroupState struct {
	Uuid         string     `json:"uuid"`
	ID           *int32     `json:"-"`
	FlagsGroupID *int32     `json:"-"`
	Js           *string    `json:"js"`
	CreatedAt    *time.Time `json:"created_at"`
}

type Folder

type Folder struct {
	Uuid      string     `json:"uuid"`
	ID        *int32     `json:"-"`
	Name      string     `json:"name"`
	OrgID     *int32     `json:"-"`
	CreatedAt *time.Time `json:"created_at"`
}

type GetUserOrganizationsRow

type GetUserOrganizationsRow struct {
	Uuid      string     `json:"uuid"`
	Name      string     `json:"name"`
	CreatedAt *time.Time `json:"created_at"`
}

type Organization

type Organization struct {
	Uuid      string     `json:"uuid"`
	ID        *int32     `json:"-"`
	Name      string     `json:"name"`
	CreatedAt *time.Time `json:"created_at"`
}

type OrganizationMember

type OrganizationMember struct {
	UserID *int32 `json:"-"`
	OrgID  *int32 `json:"-"`
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) AddOrganizationMember

func (q *Queries) AddOrganizationMember(ctx context.Context, arg AddOrganizationMemberParams) error

func (*Queries) CreateAPIKey

func (q *Queries) CreateAPIKey(ctx context.Context, arg CreateAPIKeyParams) (ApiKey, error)

func (*Queries) CreateActiveUser

func (q *Queries) CreateActiveUser(ctx context.Context, arg CreateActiveUserParams) (User, error)

func (*Queries) CreateFlagsGroup

func (q *Queries) CreateFlagsGroup(ctx context.Context, arg CreateFlagsGroupParams) (FlagsGroup, error)

func (*Queries) CreateFlagsGroupState

func (q *Queries) CreateFlagsGroupState(ctx context.Context, flagsGroupID *int32) (FlagsGroupState, error)

func (*Queries) CreateFolder

func (q *Queries) CreateFolder(ctx context.Context, arg CreateFolderParams) (Folder, error)

func (*Queries) CreateOrganization

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

func (*Queries) DeleteAPIKey

func (q *Queries) DeleteAPIKey(ctx context.Context, uuid string) error

func (*Queries) GetFlagsGroupByUUID

func (q *Queries) GetFlagsGroupByUUID(ctx context.Context, uuid string) (FlagsGroup, error)

func (*Queries) GetFlagsGroupState

func (q *Queries) GetFlagsGroupState(ctx context.Context, flagsGroupID *int32) (FlagsGroupState, error)

func (*Queries) GetFlagsGroupStateByUUID

func (q *Queries) GetFlagsGroupStateByUUID(ctx context.Context, uuid string) (FlagsGroupState, error)

func (*Queries) GetFolderByUUID

func (q *Queries) GetFolderByUUID(ctx context.Context, uuid string) (Folder, error)

func (*Queries) GetFolderFlagsGroup

func (q *Queries) GetFolderFlagsGroup(ctx context.Context, folderID *int32) ([]FlagsGroup, error)

func (*Queries) GetOrgFlagsGroup

func (q *Queries) GetOrgFlagsGroup(ctx context.Context, orgID *int32) ([]FlagsGroup, error)

func (*Queries) GetOrgFolders

func (q *Queries) GetOrgFolders(ctx context.Context, orgID *int32) ([]Folder, error)

func (*Queries) GetOrganizationAPIKeys

func (q *Queries) GetOrganizationAPIKeys(ctx context.Context, orgID *int32) ([]ApiKey, error)

func (*Queries) GetOrganizationByUUID

func (q *Queries) GetOrganizationByUUID(ctx context.Context, uuid string) (Organization, error)

func (*Queries) GetUserByEmail

func (q *Queries) GetUserByEmail(ctx context.Context, email string) (User, error)

func (*Queries) GetUserByUUID

func (q *Queries) GetUserByUUID(ctx context.Context, uuid string) (User, error)

func (*Queries) GetUserOrganizations

func (q *Queries) GetUserOrganizations(ctx context.Context, uuid string) ([]GetUserOrganizationsRow, error)

func (*Queries) UpdateFlagGroupsStateJS

func (q *Queries) UpdateFlagGroupsStateJS(ctx context.Context, arg UpdateFlagGroupsStateJSParams) (FlagsGroupState, error)

func (*Queries) UpdateFolderName

func (q *Queries) UpdateFolderName(ctx context.Context, arg UpdateFolderNameParams) error

func (*Queries) WithTx

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

type UpdateFlagGroupsStateJSParams

type UpdateFlagGroupsStateJSParams struct {
	Js           *string `json:"js"`
	FlagsGroupID *int32  `json:"-"`
}

type UpdateFolderNameParams

type UpdateFolderNameParams struct {
	Name string `json:"name"`
	Uuid string `json:"uuid"`
}

type User

type User struct {
	Uuid          string     `json:"uuid"`
	ID            *int32     `json:"-"`
	Name          string     `json:"name"`
	Email         string     `json:"email"`
	Password      string     `json:"-"`
	EmailVerified *bool      `json:"email_verified"`
	Active        *bool      `json:"active"`
	CreatedAt     *time.Time `json:"created_at"`
}

Jump to

Keyboard shortcuts

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