Documentation ¶
Index ¶
- Variables
- func CanSearch(p string) bool
- func Close()
- func CreateFile(rt, pt string, sz, mt int64, h1, h2, h3, h4, h5, h6 string)
- func Del(v IDers, d dbstorage.Database, table string)
- func DropFilesFromRoot(rt string)
- func FolderSize(p string) (size int64, count int64)
- func GenerateNewUserPasskey(snowflake string) string
- func Init()
- func QueryAssertUserName(provider, snowflake string, name string)
- func QueryDoAddUser(id int64, provider string, snowflake string, admin bool, name string)
- func SaveOAuth2InfoCb(w http.ResponseWriter, r *http.Request, provider string, id string, ...)
- func Up(v IDers, d dbstorage.Database, table string, col string, value string)
- func Upgrade()
- type DiscordRoleAccess
- func (DiscordRoleAccess) All() []*DiscordRoleAccess
- func (DiscordRoleAccess) ByID(id int64) (*DiscordRoleAccess, bool)
- func (v *DiscordRoleAccess) Delete()
- func (v DiscordRoleAccess) Scan(rows *sql.Rows) dbstorage.Scannable
- func (DiscordRoleAccess) ScanAll(q dbstorage.QueryBuilder) []*DiscordRoleAccess
- func (v *DiscordRoleAccess) SetGuildID(s string)
- func (v *DiscordRoleAccess) SetGuildName(s string)
- func (v *DiscordRoleAccess) SetPath(s string)
- func (v *DiscordRoleAccess) SetRoleID(s string)
- func (v *DiscordRoleAccess) SetRoleName(s string)
- type File
- type IDers
- type Share
- type User
- func (User) All() []*User
- func (User) ByID(id int64) (*User, bool)
- func (User) ByPasskey(pk string) (*User, bool)
- func (User) BySnowflake(provider, snowflake string) (*User, bool)
- func (v *User) FullName() string
- func (v *User) GetAccess() []string
- func (v *User) ResetPasskey()
- func (v User) Scan(rows *sql.Rows) dbstorage.Scannable
- func (User) ScanAll(q dbstorage.QueryBuilder) []*User
- func (v *User) SetName(s string)
- func (v *User) SetProvider(s string)
- func (v *User) SetSnowflake(s string)
- type UserAccess
- func (UserAccess) All() []*UserAccess
- func (UserAccess) ByID(id int64) (*UserAccess, bool)
- func (UserAccess) ByUser(user *User) []*UserAccess
- func (v *UserAccess) Delete()
- func (v UserAccess) Scan(rows *sql.Rows) dbstorage.Scannable
- func (UserAccess) ScanAll(q dbstorage.QueryBuilder) []*UserAccess
- func (v *UserAccess) SetPath(s string)
- func (v *UserAccess) SetUser(u *User)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
FS dbstorage.Database
)
Functions ¶
func CreateFile ¶
func DropFilesFromRoot ¶
func DropFilesFromRoot(rt string)
func FolderSize ¶
func GenerateNewUserPasskey ¶
func QueryAssertUserName ¶
func QueryDoAddUser ¶
func SaveOAuth2InfoCb ¶
Types ¶
type DiscordRoleAccess ¶
type DiscordRoleAccess struct { ID int64 `json:"id"` GuildID string `json:"guild_snowflake" dbsorm:"1"` RoleID string `json:"role_snowflake" dbsorm:"1"` Path string `json:"path" dbsorm:"1"` GuildName string `json:"guild_name" dbsorm:"1"` RoleName string `json:"role_name" dbsorm:"1"` }
func CreateDiscordRoleAccess ¶
func CreateDiscordRoleAccess(gi, ri, pt, gn, rn string) *DiscordRoleAccess
func (DiscordRoleAccess) All ¶
func (DiscordRoleAccess) All() []*DiscordRoleAccess
func (DiscordRoleAccess) ByID ¶
func (DiscordRoleAccess) ByID(id int64) (*DiscordRoleAccess, bool)
func (*DiscordRoleAccess) Delete ¶
func (v *DiscordRoleAccess) Delete()
func (DiscordRoleAccess) Scan ¶
func (v DiscordRoleAccess) Scan(rows *sql.Rows) dbstorage.Scannable
Scan implements dbstorage.Scannable
func (DiscordRoleAccess) ScanAll ¶
func (DiscordRoleAccess) ScanAll(q dbstorage.QueryBuilder) []*DiscordRoleAccess
func (*DiscordRoleAccess) SetGuildID ¶
func (v *DiscordRoleAccess) SetGuildID(s string)
func (*DiscordRoleAccess) SetGuildName ¶
func (v *DiscordRoleAccess) SetGuildName(s string)
func (*DiscordRoleAccess) SetPath ¶
func (v *DiscordRoleAccess) SetPath(s string)
func (*DiscordRoleAccess) SetRoleID ¶
func (v *DiscordRoleAccess) SetRoleID(s string)
func (*DiscordRoleAccess) SetRoleName ¶
func (v *DiscordRoleAccess) SetRoleName(s string)
type File ¶
type File struct { ID int64 `json:"id"` Root string `json:"root" dbsorm:"1"` Path string `json:"path" dbsorm:"1"` PathFull string Size int64 `json:"size" dbsorm:"1"` SizeS string `json:"html_size"` ModTime int64 `json:"mod_time" dbsorm:"1"` ModTimeS string `json:"html_modtime"` MD5 string `json:"hash_md5" dbsorm:"1"` SHA1 string `json:"hash_sha1" dbsorm:"1"` SHA256 string `json:"hash_sha256" dbsorm:"1"` SHA512 string `json:"hash_sha512" dbsorm:"1"` SHA3 string `json:"hash_sha3" dbsorm:"1"` BLAKE2b string `json:"hash_blake2b" dbsorm:"1"` }
func (*File) PopulateHashes ¶
func (*File) SetModTime ¶
type Share ¶
type Share struct {}
func CreateShare ¶
type User ¶
type User struct { ID int64 `json:"id"` Snowflake string `json:"snowflake" dbsorm:"1"` Admin bool `json:"admin" dbsorm:"1"` Name string `json:"name" dbsorm:"1"` JoinedOn string `json:"joined_on" dbsorm:"1"` PassKey string `json:"passkey" dbsorm:"1"` Provider string `json:"provider" dbsorm:"1"` }
func (*User) ResetPasskey ¶
func (v *User) ResetPasskey()
func (*User) SetProvider ¶
func (*User) SetSnowflake ¶
type UserAccess ¶
type UserAccess struct { ID int64 `json:"id"` User int64 `json:"user" dbsorm:"1"` Path string `json:"path" dbsorm:"1"` }
func CreateUserAccess ¶
func CreateUserAccess(us *User, pt string) *UserAccess
func (UserAccess) All ¶
func (UserAccess) All() []*UserAccess
func (UserAccess) ByID ¶
func (UserAccess) ByID(id int64) (*UserAccess, bool)
func (UserAccess) ByUser ¶
func (UserAccess) ByUser(user *User) []*UserAccess
func (*UserAccess) Delete ¶
func (v *UserAccess) Delete()
func (UserAccess) Scan ¶
func (v UserAccess) Scan(rows *sql.Rows) dbstorage.Scannable
Scan implements dbstorage.Scannable
func (UserAccess) ScanAll ¶
func (UserAccess) ScanAll(q dbstorage.QueryBuilder) []*UserAccess
func (*UserAccess) SetPath ¶
func (v *UserAccess) SetPath(s string)
func (*UserAccess) SetUser ¶
func (v *UserAccess) SetUser(u *User)
Click to show internal directories.
Click to hide internal directories.