Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPassword ¶
CheckPassword compares the hash with the salted password. A nil return means the password is correct, but an error could mean either the password is not correct, or the salt process failed - indicated in logs
func FmtBytes ¶
FmtBytes converts the numeric byte size value to the appropriate magnitude size in KB, MB, GB, TB, PB, or EB.
func HashPassword ¶
HashPassword encrypts the salted password using bcrypt
Types ¶
type Config ¶
type Config struct {
contentVO.Item
Name string `json:"name"`
Domain string `json:"domain"`
Netlify string `json:"netlify"`
BindAddress string `json:"bind_addr"`
HTTPPort string `json:"http_port"`
HTTPSPort string `json:"https_port"`
DevHTTPSPort string `json:"dev_https_port"`
AdminEmail string `json:"admin_email"`
ClientSecret string `json:"client_secret"`
Etag string `json:"etag"`
DisableCORS bool `json:"cors_disabled"`
DisableGZIP bool `json:"gzip_disabled"`
DisableHTTPCache bool `json:"cache_disabled"`
CacheMaxAge int64 `json:"cache_max_age"`
CacheInvalidate []string `json:"cache"`
BackupBasicAuthUser string `json:"backup_basic_auth_user"`
BackupBasicAuthPassword string `json:"backup_basic_auth_password"`
}
func (*Config) IsCacheInvalidate ¶
func (*Config) MarshalEditor ¶
MarshalEditor writes a buffer of html to edit a Post and partially implements editor.Editable
type FileUpload ¶
type FileUpload struct {
contentVO.Item
Name string `json:"name"`
Path string `json:"path"`
ContentLength int64 `json:"content_length"`
ContentType string `json:"content_type"`
}
FileUpload represents the file uploaded to the system
func (*FileUpload) FilePath ¶
func (f *FileUpload) FilePath() string
func (*FileUpload) MarshalEditor ¶
func (f *FileUpload) MarshalEditor() ([]byte, error)
MarshalEditor writes a buffer of html to edit a Post and partially implements editor.Editable
func (*FileUpload) Push ¶
func (f *FileUpload) Push() []string
func (*FileUpload) String ¶
func (f *FileUpload) String() string
String partially implements item.Identifiable and overrides Item's String()