pensive

package module
v0.0.0-...-4c3d7af Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

README

Pensive

drawing drawing

prerequisites

docker golang redis

rename .env copy to .env

run dev

make dev

run prod

this includes prometheus and grafana

make prod

license

Apache 2.0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidLogin common error on login form when the user does not match its login credentials
	ErrInvalidLogin = errors.New("invalid login")
)

Functions

func Authenticate

func Authenticate(hash []byte, password string) error

func ValidatePassword

func ValidatePassword(hash string) ([]byte, error)

Types

type Post

type Post struct {
	ID      int64 // required, nonzero
	User    User  // required, nonzero
	Body    string
	MediaID string

	// do not manually fill-in the ff.
	CreatedAt *time.Time // required, nonzero
	UpdatedAt *time.Time // required, nonzero
}

type PostPublic

type PostPublic struct {
	User           string
	Caption        string
	AttachmentURL  string
	AttachmentType string
	UpdatedAt      string
}

PostPublic is the post displayed through the site

type User

type User struct {
	ID       int64  // required, nonzero
	Username string // required, nonzero
	Hash     []byte // required, nonzero
	Email    string // required, nonzero

	// do not manually fill-in the ff.
	CreatedAt *time.Time // required, nonzero
	UpdatedAt *time.Time // required, nonzero
}

Directories

Path Synopsis
cmd
internal
pkg
package html keeps the embedding of local (./) html file
package html keeps the embedding of local (./) html file

Jump to

Keyboard shortcuts

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