models

package
v0.0.0-...-41cd4ca Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2022 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	ID         int64     `validate:"-" bun:",pk,autoincrement"`
	CreatedAt  time.Time `validate:"-" bun:",nullzero,notnull,default:current_timestamp"`
	UpdatedAt  time.Time `validate:"-" bun:",nullzero,notnull,default:current_timestamp"`
	Username   string    `validate:"-" bun:",nullzero,notnull"`
	InstanceID int64     `validate:"-" bun:",nullzero,notnull"`
	Instance   *Instance `validate:"-" bun:"rel:belongs-to,join:instance_id=id"`
	UserID     int64     `validate:"-" bun:",nullzero,notnull"`
	User       *User     `validate:"-" bun:"rel:belongs-to,join:user_id=id"`
}

Account represents an account.

type GeminiIdentity

type GeminiIdentity struct {
	ID        int64     `validate:"-" bun:",pk,autoincrement"`
	CreatedAt time.Time `validate:"-" bun:",nullzero,notnull,default:current_timestamp"`
	UpdatedAt time.Time `validate:"-" bun:",nullzero,notnull,default:current_timestamp"`
	Hash      string    `validate:"-" bun:",nullzero,notnull,unique"`
	AdoptedOn time.Time `validate:"-" bun:",nullzero"`
	UserID    int64     `validate:"-" bun:",nullzero,notnull"`
	USer      *Instance `validate:"-" bun:"rel:belongs-to,join:user_id=id"`
}

GeminiIdentity represents a gemini identity.

type Instance

type Instance struct {
	ID         int64     `validate:"-" bun:",pk,autoincrement,nullzero,notnull,unique"`
	CreatedAt  time.Time `validate:"-" bun:",nullzero,notnull,default:current_timestamp"`
	UpdatedAt  time.Time `validate:"-" bun:",nullzero,notnull,default:current_timestamp"`
	Domain     string    `validate:"required,fqdn" bun:",nullzero,notnull,unique"`
	PublicKey  string    `validate:"-" bun:",nullzero"`
	PrivateKey string    `validate:"-" bun:",nullzero"`
}

type User

type User struct {
	ID               int64             `validate:"-" bun:",pk,autoincrement"`
	CreatedAt        time.Time         `validate:"-" bun:",nullzero,notnull,default:current_timestamp"`
	UpdatedAt        time.Time         `validate:"-" bun:",nullzero,notnull,default:current_timestamp"`
	GeminiIdentities []*GeminiIdentity `validate:"-" bun:"rel:has-many,join:id=user_id"`
}

User represents a durian user.

Jump to

Keyboard shortcuts

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