models

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: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IfdEntry

type IfdEntry struct {
	IfdPath     string                      `json:"ifd_path"`
	TagId       uint16                      `json:"tag_id"`
	TagName     string                      `json:"tag_name"`
	TagTypeId   exifcommon.TagTypePrimitive `json:"tag_type_id"`
	TagTypeName string                      `json:"tag_type_name"`
	UnitCount   uint32                      `json:"unit_count"`
	Value       interface{}                 `json:"value"`
	ValueString string                      `json:"value_string"`
}

func (IfdEntry) ToEntity

func (e IfdEntry) ToEntity() entities.PhotoMetaItem

type OauthAccessClientType

type OauthAccessClientType string
const (
	OauthClientTypeClientCredential OauthAccessClientType = "client_credential"
	OauthClientTypeUserCredential   OauthAccessClientType = "user_credential"
)

func (OauthAccessClientType) Entity

type OauthAccessToken

type OauthAccessToken struct {
	ClientID   string                `json:"client_id" validate:"required"`
	ClientType OauthAccessClientType `json:"client_type" validate:"required"`
	Scope      OauthAccessTokenScope `json:"scope" validate:"required"`
	UserID     string                `json:"user_id,omitempty"`
}

func (*OauthAccessToken) String

func (t *OauthAccessToken) String() (string, error)

type OauthAccessTokenScope

type OauthAccessTokenScope string
const (
	OauthScopeAdmin OauthAccessTokenScope = "admin"
	OauthScopeUser  OauthAccessTokenScope = "user"
)

func OauthAccessTokenFromEntity

func OauthAccessTokenFromEntity(t entities.OauthScope) OauthAccessTokenScope

func (OauthAccessTokenScope) Entity

type OauthCode

type OauthCode struct {
	ClientID    string `json:"client_id"`
	UserID      string `json:"user_id"`
	RedirectURL string `json:"redirect_url"`
}

func (*OauthCode) BindFromJSON

func (c *OauthCode) BindFromJSON(jsonString string) error

func (*OauthCode) JSONString

func (c *OauthCode) JSONString() (string, error)

type PhotoDateHistogram

type PhotoDateHistogram struct {
	EpochSec int64
	DocCount int
}

func (*PhotoDateHistogram) ToEntity

type PhotoIndex

type PhotoIndex struct {
	PhotoID          int      `json:"photo_id"`
	FileTypes        []string `json:"file_types"`
	Name             string   `json:"name"`
	ImportedAt       int64    `json:"imported_at"`
	DateTimeOriginal int64    `json:"date_time_original"`
	PreviewURL       string   `json:"preview_url"`
	ThumbnailURL     string   `json:"thumbnail_url"`
}

func NewPhotoIndex

func NewPhotoIndex(p *entities.Photo, dateTimeOriginalEpoc int64) *PhotoIndex

func NewPhotoIndexFromMap

func NewPhotoIndexFromMap(v map[string]any) (*PhotoIndex, error)

func (*PhotoIndex) BodyReader

func (m *PhotoIndex) BodyReader() (io.Reader, error)

func (*PhotoIndex) PhotoIndexID

func (m *PhotoIndex) PhotoIndexID() string

func (*PhotoIndex) ToEntityItem

func (m *PhotoIndex) ToEntityItem() *entities.PhotoSearchResultItem

type PhotoResult

type PhotoResult struct {
	Total  int
	Photos []*PhotoIndex
}

type PhotoUploadSign

type PhotoUploadSign struct {
	UserID string `json:"user_id,omitempty"`
}

Jump to

Keyboard shortcuts

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