domainmodels

package
v0.0.0-...-175e951 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const ImageResultPerPage = 24

Variables

This section is empty.

Functions

This section is empty.

Types

type ExternalImageIdentifier

type ExternalImageIdentifier struct {
	StorageDefinitionIdentifier string
	FileIdentifier              string
}

type Image

type Image struct {
	Id              string
	CreatedById     string
	CreatedAt       time.Time
	Name            string
	Identifier      string
	RootId          string
	ParentId        string
	UploaderIP      string
	MIMEType        string
	NominalWidth    int32
	NominalHeight   int32
	NominalByteSize int32
}

func (*Image) GetURL

func (i *Image) GetURL(imageDomain string, isSecure bool, storedImages []*ExternalImageIdentifier, format ImageURLFormat) string

func (*Image) HashStr

func (i *Image) HashStr() string

type ImageOrderField

type ImageOrderField struct {
	pagination.BaseOrderField
}

func NewImageOrderField

func NewImageOrderField(name string, asc bool) *ImageOrderField

func (*ImageOrderField) GetValue

func (f *ImageOrderField) GetValue(object interface{}) string

func (*ImageOrderField) Reverse

func (f *ImageOrderField) Reverse() pagination.OrderField

type ImageURLFormat

type ImageURLFormat string
const (
	ImageURLFormat_CANONICAL      ImageURLFormat = "canonical"
	ImageURLFormat_DIRECT         ImageURLFormat = "direct"
	ImageURLFormat_BACKEND_DIRECT ImageURLFormat = "backend_direct"
)

func (ImageURLFormat) IsValid

func (f ImageURLFormat) IsValid() bool

type ListImageResult

type ListImageResult struct {
	Images  []*Image
	HasNext bool
	HasPrev bool
}

type Organization

type Organization struct {
	Id          string
	DisplayName string
	Slug        string
}

type OrganizationUser

type OrganizationUser struct {
	Id           string
	Organization *Organization
	User         *User
	Roles        []*Role
}

func (*OrganizationUser) CanManage

func (ou *OrganizationUser) CanManage(other *OrganizationUser) bool

func (*OrganizationUser) HasAdminAccess

func (ou *OrganizationUser) HasAdminAccess() bool

func (*OrganizationUser) IsSiteOwner

func (ou *OrganizationUser) IsSiteOwner() bool

type Role

type Role struct {
	Id   string
	Key  string
	Name string
}

type StorageDefinition

type StorageDefinition struct {
	Id          string
	Identifier  string
	StorageType StorageTypeName
	Config      string
	IsEnabled   bool
	Priority    int32
}

type StorageTypeName

type StorageTypeName string
const (
	S3StorageType     StorageTypeName = "s3"
	FSStorageType     StorageTypeName = "fs"
	WebDavStorageType StorageTypeName = "webdav"
)

func (StorageTypeName) IsValid

func (s StorageTypeName) IsValid() bool

type StoredImage

type StoredImage struct {
	Id                  string
	Image               *Image
	StorageDefinitionId string
	FileIdentifier      string
	CopiedFrom          *StoredImage
	IsFileDeleted       bool
}

type User

type User struct {
	Id    string
	Email string
}

type UserWithOrganizationUsers

type UserWithOrganizationUsers struct {
	User              *User
	OrganizationUsers []*OrganizationUser
}

Jump to

Keyboard shortcuts

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