domain

package
v0.0.0-...-ad95247 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessLevel

type AccessLevel uint8
const (
	Unknown AccessLevel = iota
	RO
	RW
	ADMIN
)

func (AccessLevel) MarshalGQL

func (a AccessLevel) MarshalGQL(w io.Writer)

func (*AccessLevel) Scan

func (a *AccessLevel) Scan(src any) error

func (AccessLevel) String

func (a AccessLevel) String() string

func (AccessLevel) UnmarshalGQL

func (a AccessLevel) UnmarshalGQL(v any) error

func (AccessLevel) Value

func (a AccessLevel) Value() (driver.Value, error)

func (AccessLevel) Values

func (a AccessLevel) Values() []string

type FileEntry

type FileEntry struct {
	ID          uuid.UUID
	BucketID    uuid.UUID
	ObjectId    *uuid.UUID
	Name        string
	IsDirectory bool
	Tags        []string
}

FileEntry is an entry in a tree it refers to an object that is stored in the filesystem the same object might be referenced by multiple entries

type FileObject

type FileObject struct {
	ID         uuid.UUID
	BucketID   uuid.UUID
	Hash       []byte
	MimeType   string
	Size       int64
	StorageKey string
}

FileObject represents the actual data that is stored on some file system backend

type InviteToken

type InviteToken []byte

func (InviteToken) String

func (t InviteToken) String() string

type Session

type Session struct {
	ID   ulid.ULID
	User User
	Key  []byte
}

type User

type User struct {
	ID               uuid.UUID
	Email            string
	GivenName        string
	Surname          string
	PersonalBucketID uuid.UUID

	IsAdmin    bool
	PublicKey  string
	PrivateKey []byte
}

type UserInvite

type UserInvite struct {
	Invitee uuid.UUID
	Admin   bool
	Token   InviteToken
}

type UserRole

type UserRole string
const (
	UserRoleNone  UserRole = ""
	UserRoleUser  UserRole = "user"
	UserRoleAdmin UserRole = "admin"
)

Jump to

Keyboard shortcuts

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