Documentation
¶
Index ¶
- func SelectedMediaTypes(mediaTypes []string) map[string]bool
- type DBTX
- type HistoriesCategoryRenameParams
- type History
- type HistoryAddFromArchiveParams
- type HistoryAddParams
- type HistoryCountByFileParams
- type HistoryCountParams
- type HistoryGetByOwnerParams
- type HistoryGetPageParams
- type HistoryGetParams
- type HistoryOwnersParams
- type HistoryOwnersRow
- type HistoryRemoveParams
- type HistoryUpdateCategoriesParams
- type HistoryUpdateCoordinatesParams
- type HistoryUpdateOwnerParams
- type NetworkType
- type NullNetworkType
- type NullPostType
- type Owner
- type Passkey
- type PasskeyDeleteParams
- type PasskeyRenameParams
- type PostType
- type Querier
- type Queries
- func (q *Queries) Close() error
- func (q *Queries) HistoriesCategoryRename(ctx context.Context, arg HistoriesCategoryRenameParams) error
- func (q *Queries) HistoryAdd(ctx context.Context, arg HistoryAddParams) (History, error)
- func (q *Queries) HistoryAddFromArchive(ctx context.Context, arg HistoryAddFromArchiveParams) (History, error)
- func (q *Queries) HistoryCount(ctx context.Context, arg HistoryCountParams) (int64, error)
- func (q *Queries) HistoryCountByFile(ctx context.Context, arg HistoryCountByFileParams) (int64, error)
- func (q *Queries) HistoryGet(ctx context.Context, arg HistoryGetParams) (History, error)
- func (q *Queries) HistoryGetByOwner(ctx context.Context, arg HistoryGetByOwnerParams) (History, error)
- func (q *Queries) HistoryGetPage(ctx context.Context, arg HistoryGetPageParams) ([]History, error)
- func (q *Queries) HistoryOwners(ctx context.Context, arg HistoryOwnersParams) ([]HistoryOwnersRow, error)
- func (q *Queries) HistoryRemove(ctx context.Context, arg HistoryRemoveParams) error
- func (q *Queries) HistoryUpdateCategories(ctx context.Context, arg HistoryUpdateCategoriesParams) (History, error)
- func (q *Queries) HistoryUpdateCoordinates(ctx context.Context, arg HistoryUpdateCoordinatesParams) error
- func (q *Queries) HistoryUpdateOwner(ctx context.Context, arg HistoryUpdateOwnerParams) error
- func (q *Queries) PasskeyDelete(ctx context.Context, arg PasskeyDeleteParams) error
- func (q *Queries) PasskeyRename(ctx context.Context, arg PasskeyRenameParams) error
- func (q *Queries) PasskeyUpdateSignCount(ctx context.Context, passkeyID []byte) error
- func (q *Queries) UpdateHistoryDuplicateFile(ctx context.Context, arg UpdateHistoryDuplicateFileParams) (History, error)
- func (q *Queries) UpdateHistoryRemoveFile(ctx context.Context, arg UpdateHistoryRemoveFileParams) (History, error)
- func (q *Queries) UserAdd(ctx context.Context, arg UserAddParams) (User, error)
- func (q *Queries) UserCategoryAdd(ctx context.Context, arg UserCategoryAddParams) error
- func (q *Queries) UserCategoryRemove(ctx context.Context, arg UserCategoryRemoveParams) error
- func (q *Queries) UserCreatePasskey(ctx context.Context, arg UserCreatePasskeyParams) error
- func (q *Queries) UserGetByID(ctx context.Context, userID uuid.UUID) (User, error)
- func (q *Queries) UserGetByUsername(ctx context.Context, username string) (User, error)
- func (q *Queries) UserGetPasskeysByID(ctx context.Context, userID uuid.UUID) ([]Passkey, error)
- func (q *Queries) UserUpdateHash(ctx context.Context, arg UserUpdateHashParams) error
- func (q *Queries) UserUpdateInstagramSession(ctx context.Context, arg UserUpdateInstagramSessionParams) error
- func (q *Queries) WithTx(tx *sql.Tx) *Queries
- type UpdateHistoryDuplicateFileParams
- type UpdateHistoryRemoveFileParams
- type User
- type UserAddParams
- type UserCategoryAddParams
- type UserCategoryRemoveParams
- type UserCreatePasskeyParams
- type UserUpdateHashParams
- type UserUpdateInstagramSessionParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SelectedMediaTypes ¶
Types ¶
type History ¶
type History struct {
Username string `json:"username"`
PostType PostType `json:"post_type"`
PostOwner string `json:"post_owner"`
Post string `json:"post"`
PostDate time.Time `json:"post_date"`
Files []string `json:"files"`
Categories []string `json:"categories"`
Incognito bool `json:"incognito"`
Coordinates types.NullPoint `json:"coordinates"`
}
type HistoryAddParams ¶
type HistoryAddParams struct {
Username string `json:"username"`
PostType PostType `json:"post_type"`
PostOwner string `json:"post_owner"`
Post string `json:"post"`
Files []string `json:"files"`
Categories []string `json:"categories"`
Latitude float64 `json:"latitude"`
Longitude float64 `json:"longitude"`
}
type HistoryCountParams ¶
type HistoryCountParams struct {
PostTypes []PostType `json:"post_types"`
Exclusive bool `json:"exclusive"`
Categories []string `json:"categories"`
UserCategories []string `json:"user_categories"`
PostOwners []string `json:"post_owners"`
Username string `json:"username"`
OnlyWithCoordinates bool `json:"only_with_coordinates"`
}
type HistoryGetByOwnerParams ¶
type HistoryGetPageParams ¶
type HistoryGetPageParams struct {
PostTypes []PostType `json:"post_types"`
Exclusive bool `json:"exclusive"`
Categories []string `json:"categories"`
UserCategories []string `json:"user_categories"`
PostOwners []string `json:"post_owners"`
Username string `json:"username"`
OnlyWithCoordinates bool `json:"only_with_coordinates"`
Page int32 `json:"page"`
PageSize int32 `json:"page_size"`
}
type HistoryGetParams ¶
type HistoryOwnersParams ¶
type HistoryOwnersParams struct {
PostTypes []PostType `json:"post_types"`
Exclusive bool `json:"exclusive"`
Categories []string `json:"categories"`
UserCategories []string `json:"user_categories"`
PostOwner string `json:"post_owner"`
Username string `json:"username"`
OnlyWithCoordinates bool `json:"only_with_coordinates"`
}
type HistoryOwnersRow ¶
type HistoryRemoveParams ¶
type NetworkType ¶
type NetworkType string
const ( NetworkTypeInstagram NetworkType = "instagram" NetworkTypeTiktok NetworkType = "tiktok" NetworkTypeVsco NetworkType = "vsco" )
func (*NetworkType) Scan ¶
func (e *NetworkType) Scan(src interface{}) error
func (NetworkType) Valid ¶
func (e NetworkType) Valid() bool
type NullNetworkType ¶
type NullNetworkType struct {
NetworkType NetworkType `json:"network_type"`
Valid bool `json:"valid"` // Valid is true if NetworkType is not NULL
}
func (*NullNetworkType) Scan ¶
func (ns *NullNetworkType) Scan(value interface{}) error
Scan implements the Scanner interface.
type NullPostType ¶
type NullPostType struct {
PostType PostType `json:"post_type"`
Valid bool `json:"valid"` // Valid is true if PostType is not NULL
}
func (*NullPostType) Scan ¶
func (ns *NullPostType) Scan(value interface{}) error
Scan implements the Scanner interface.
type Passkey ¶
type Passkey struct {
ID []byte `json:"id"`
Name string `json:"name"`
UserID uuid.UUID `json:"user_id"`
PublicKey []byte `json:"public_key"`
AttestationType string `json:"attestation_type"`
Aaguid []byte `json:"aaguid"`
SignCount int64 `json:"sign_count"`
Transports []string `json:"transports"`
BackupEligible bool `json:"backup_eligible"`
BackupState bool `json:"backup_state"`
}
type PasskeyDeleteParams ¶
type PasskeyRenameParams ¶
type Querier ¶
type Querier interface {
HistoriesCategoryRename(ctx context.Context, arg HistoriesCategoryRenameParams) error
HistoryAdd(ctx context.Context, arg HistoryAddParams) (History, error)
HistoryAddFromArchive(ctx context.Context, arg HistoryAddFromArchiveParams) (History, error)
HistoryCount(ctx context.Context, arg HistoryCountParams) (int64, error)
HistoryCountByFile(ctx context.Context, arg HistoryCountByFileParams) (int64, error)
HistoryGet(ctx context.Context, arg HistoryGetParams) (History, error)
HistoryGetByOwner(ctx context.Context, arg HistoryGetByOwnerParams) (History, error)
// https://docs.sqlc.dev/en/stable/howto/select.html#passing-a-slice-as-a-parameter-to-a-query
// https://docs.sqlc.dev/en/stable/howto/named_parameters.html
HistoryGetPage(ctx context.Context, arg HistoryGetPageParams) ([]History, error)
HistoryOwners(ctx context.Context, arg HistoryOwnersParams) ([]HistoryOwnersRow, error)
HistoryRemove(ctx context.Context, arg HistoryRemoveParams) error
HistoryUpdateCategories(ctx context.Context, arg HistoryUpdateCategoriesParams) (History, error)
HistoryUpdateCoordinates(ctx context.Context, arg HistoryUpdateCoordinatesParams) error
HistoryUpdateOwner(ctx context.Context, arg HistoryUpdateOwnerParams) error
PasskeyDelete(ctx context.Context, arg PasskeyDeleteParams) error
PasskeyRename(ctx context.Context, arg PasskeyRenameParams) error
PasskeyUpdateSignCount(ctx context.Context, passkeyID []byte) error
UpdateHistoryDuplicateFile(ctx context.Context, arg UpdateHistoryDuplicateFileParams) (History, error)
UpdateHistoryRemoveFile(ctx context.Context, arg UpdateHistoryRemoveFileParams) (History, error)
UserAdd(ctx context.Context, arg UserAddParams) (User, error)
UserCategoryAdd(ctx context.Context, arg UserCategoryAddParams) error
UserCategoryRemove(ctx context.Context, arg UserCategoryRemoveParams) error
UserCreatePasskey(ctx context.Context, arg UserCreatePasskeyParams) error
UserGetByID(ctx context.Context, userID uuid.UUID) (User, error)
UserGetByUsername(ctx context.Context, username string) (User, error)
UserGetPasskeysByID(ctx context.Context, userID uuid.UUID) ([]Passkey, error)
UserUpdateHash(ctx context.Context, arg UserUpdateHashParams) error
UserUpdateInstagramSession(ctx context.Context, arg UserUpdateInstagramSessionParams) error
}
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) HistoriesCategoryRename ¶
func (q *Queries) HistoriesCategoryRename(ctx context.Context, arg HistoriesCategoryRenameParams) error
func (*Queries) HistoryAdd ¶
func (*Queries) HistoryAddFromArchive ¶
func (*Queries) HistoryCount ¶
func (*Queries) HistoryCountByFile ¶
func (*Queries) HistoryGet ¶
func (*Queries) HistoryGetByOwner ¶
func (*Queries) HistoryGetPage ¶
https://docs.sqlc.dev/en/stable/howto/select.html#passing-a-slice-as-a-parameter-to-a-query https://docs.sqlc.dev/en/stable/howto/named_parameters.html
func (*Queries) HistoryOwners ¶
func (q *Queries) HistoryOwners(ctx context.Context, arg HistoryOwnersParams) ([]HistoryOwnersRow, error)
func (*Queries) HistoryRemove ¶
func (q *Queries) HistoryRemove(ctx context.Context, arg HistoryRemoveParams) error
func (*Queries) HistoryUpdateCategories ¶
func (*Queries) HistoryUpdateCoordinates ¶
func (q *Queries) HistoryUpdateCoordinates(ctx context.Context, arg HistoryUpdateCoordinatesParams) error
func (*Queries) HistoryUpdateOwner ¶
func (q *Queries) HistoryUpdateOwner(ctx context.Context, arg HistoryUpdateOwnerParams) error
func (*Queries) PasskeyDelete ¶
func (q *Queries) PasskeyDelete(ctx context.Context, arg PasskeyDeleteParams) error
func (*Queries) PasskeyRename ¶
func (q *Queries) PasskeyRename(ctx context.Context, arg PasskeyRenameParams) error
func (*Queries) PasskeyUpdateSignCount ¶
func (*Queries) UpdateHistoryDuplicateFile ¶
func (*Queries) UpdateHistoryRemoveFile ¶
func (*Queries) UserCategoryAdd ¶
func (q *Queries) UserCategoryAdd(ctx context.Context, arg UserCategoryAddParams) error
func (*Queries) UserCategoryRemove ¶
func (q *Queries) UserCategoryRemove(ctx context.Context, arg UserCategoryRemoveParams) error
func (*Queries) UserCreatePasskey ¶
func (q *Queries) UserCreatePasskey(ctx context.Context, arg UserCreatePasskeyParams) error
func (*Queries) UserGetByID ¶
func (*Queries) UserGetByUsername ¶
func (*Queries) UserGetPasskeysByID ¶
func (*Queries) UserUpdateHash ¶
func (q *Queries) UserUpdateHash(ctx context.Context, arg UserUpdateHashParams) error
func (*Queries) UserUpdateInstagramSession ¶
func (q *Queries) UserUpdateInstagramSession(ctx context.Context, arg UserUpdateInstagramSessionParams) error
type User ¶
type User struct {
Username string `json:"username"`
PasswordHash string `json:"password_hash"`
InstagramSessionID string `json:"instagram_session_id"`
InstagramUserID string `json:"instagram_user_id"`
Network NetworkType `json:"network"`
Categories []string `json:"categories"`
TiktokSessionID string `json:"tiktok_session_id"`
TiktokSessionIDGuard string `json:"tiktok_session_id_guard"`
ID uuid.UUID `json:"id"`
}
type UserAddParams ¶
type UserCategoryAddParams ¶
type UserCreatePasskeyParams ¶
type UserCreatePasskeyParams struct {
PasskeyID []byte `json:"passkey_id"`
UserID uuid.UUID `json:"user_id"`
Name string `json:"name"`
PublicKey []byte `json:"public_key"`
AttestationType string `json:"attestation_type"`
Aaguid []byte `json:"aaguid"`
SignCount int64 `json:"sign_count"`
Transports []string `json:"transports"`
BackupEligible bool `json:"backup_eligible"`
BackupState bool `json:"backup_state"`
}
type UserUpdateHashParams ¶
Click to show internal directories.
Click to hide internal directories.