entities

package
v0.0.0-...-adb56df Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OAuthClientRedirectURL

type OAuthClientRedirectURL struct {
	OAuthClientRedirectUrlID int
	OauthClientID            string
	RedirectURL              string
}

type OAuthClientRedirectURLList

type OAuthClientRedirectURLList []*OAuthClientRedirectURL

func (OAuthClientRedirectURLList) IsMatchURL

func (l OAuthClientRedirectURLList) IsMatchURL(u string) bool

type OAuthCode

type OAuthCode struct {
	Code        string
	ClientID    string
	UserID      string
	RedirectURL string
}

type Oauth2AuthorizationCode

type Oauth2AuthorizationCode struct {
	AccessToken  string
	RefreshToken string
	ExpireIn     int64
}

type Oauth2ClientCredential

type Oauth2ClientCredential struct {
	AccessToken string
	TokenType   OauthClientType
	ExpireIn    int
}

type OauthClient

type OauthClient struct {
	OauthClientID      string
	ClientSecretHashed string
	Name               string
	Scope              OauthScope
	ClientType         OauthClientType
	RedirectURLs       []string
}

type OauthClientType

type OauthClientType int
const (
	OauthClientTypeUnknown          OauthClientType = 0
	OauthClientTypeUserClient       OauthClientType = 1
	OauthClientTypeClientCredential OauthClientType = 2
)

func (OauthClientType) Int

func (t OauthClientType) Int() int

func (OauthClientType) String

func (t OauthClientType) String() string

type OauthScope

type OauthScope string
const (
	OauthScopeUnknown OauthScope = "Unknown"
	OauthScopeUser    OauthScope = "General"
	OauthScopeAdmin   OauthScope = "Admin"
)

func (OauthScope) String

func (s OauthScope) String() string

type OauthSession

type OauthSession struct {
	ClientType OauthClientType
	Scope      OauthScope
	ClientID   string
	UserID     string
}

type Photo

type Photo struct {
	PhotoID      int
	Name         string
	ImportedAt   time.Time
	FileNameHash string
	Files        PhotoFileList
}

func (Photo) HasJpeg

func (e Photo) HasJpeg() bool

func (Photo) PreviewURL

func (e Photo) PreviewURL() string

func (Photo) ThumbnailURL

func (e Photo) ThumbnailURL() string

type PhotoDateTimeAggregation

type PhotoDateTimeAggregation []*PhotoDateTimeAggregationItem

type PhotoDateTimeAggregationItem

type PhotoDateTimeAggregationItem struct {
	Year  int
	Month int
	Date  int
	Num   int
}

type PhotoFile

type PhotoFile struct {
	PhotoFileID int
	PhotoID     int
	FilePath    string
	ImportedAt  time.Time
	FileHash    string
}

func (PhotoFile) FileType

func (f PhotoFile) FileType() PhotoFileType

func (PhotoFile) MimeType

func (f PhotoFile) MimeType() string

type PhotoFileList

type PhotoFileList []*PhotoFile

func (PhotoFileList) FileTypes

func (list PhotoFileList) FileTypes() []PhotoFileType

func (PhotoFileList) FindFileByFileType

func (list PhotoFileList) FindFileByFileType(photoID int, fileType PhotoFileType) *PhotoFile

func (PhotoFileList) FindFileTypesByPhotoID

func (list PhotoFileList) FindFileTypesByPhotoID(photoID int) []PhotoFileType

type PhotoFileType

type PhotoFileType string
const (
	PhotoFileTypeJPEG    PhotoFileType = "jpeg"
	PhotoFileTypeRAW     PhotoFileType = "raw"
	PhotoFileTypeUnknown PhotoFileType = "unknown"
)

func (PhotoFileType) ToString

func (t PhotoFileType) ToString() string

type PhotoFileTypeList

type PhotoFileTypeList []PhotoFileType

func (PhotoFileTypeList) ToStrings

func (l PhotoFileTypeList) ToStrings() []string

type PhotoList

type PhotoList []*Photo

func (PhotoList) PhotoIDs

func (l PhotoList) PhotoIDs() []int

type PhotoMeta

type PhotoMeta []*PhotoMetaItem

func (PhotoMeta) Sort

func (m PhotoMeta) Sort() PhotoMeta

type PhotoMetaItem

type PhotoMetaItem struct {
	PhotoMetaItemID int
	TagID           int
	TagName         string
	TagType         string
	ValueString     string
}

func (PhotoMetaItem) ValueInt

func (i PhotoMetaItem) ValueInt() int

type PhotoSearchResult

type PhotoSearchResult struct {
	Items []*PhotoSearchResultItem
	Total int
}

type PhotoSearchResultItem

type PhotoSearchResultItem struct {
	PhotoID          int
	FileTypes        []string
	Name             string
	ImportedAt       time.Time
	DateTimeOriginal time.Time
	PreviewURL       string
	ThumbnailURL     string
}

type PhotoUploadInfo

type PhotoUploadInfo struct {
	UserID string
}

type PhotoUploadSign

type PhotoUploadSign struct {
	SignToken string
	ExpireAt  int
}

type StorageFileData

type StorageFileData []byte

func (StorageFileData) FileHash

func (e StorageFileData) FileHash() string

type StorageFileInfo

type StorageFileInfo struct {
	Name  string
	Path  string
	Ext   string
	IsDir bool
}

func (StorageFileInfo) IsMatchExt

func (f StorageFileInfo) IsMatchExt(extensions []string) bool

type User

type User struct {
	UserID string
	Name   string
	Status UserStatus
}

type UserAuth

type UserAuth struct {
	UserID                  string
	OAuthClientID           string
	RefreshToken            string
	RefreshTokenPublishedAt int64
}

type UserList

type UserList []*User

type UserPassword

type UserPassword struct {
	UserId         string
	Password       string
	LastModifiedAt time.Time
	IsInitialized  bool
}

type UserStatus

type UserStatus int
const (
	UserStatusActive     UserStatus = 1
	UserStatusWithdrawal UserStatus = 2
)

Jump to

Keyboard shortcuts

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