Documentation ¶
Index ¶
- type Account
- type GeminiIdentity
- type Instance
- func (i *Instance) GetPrivateKey() (*rsa.PrivateKey, error)
- func (i *Instance) GetPublicKey() (*rsa.PublicKey, error)
- func (i *Instance) IsPunycode() bool
- func (i *Instance) PublicKeyPEM() (string, error)
- func (i *Instance) SetPrivateKey(key *rsa.PrivateKey) error
- func (i *Instance) SetPublicKey(key *rsa.PublicKey) error
- func (i *Instance) String() string
- func (i *Instance) UnicodeDomain() string
- type User
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"` }
func (*Instance) GetPrivateKey ¶
func (i *Instance) GetPrivateKey() (*rsa.PrivateKey, error)
func (*Instance) IsPunycode ¶
func (*Instance) PublicKeyPEM ¶
func (*Instance) SetPrivateKey ¶
func (i *Instance) SetPrivateKey(key *rsa.PrivateKey) error
func (*Instance) UnicodeDomain ¶
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.
Click to show internal directories.
Click to hide internal directories.