pioupiou

package
v0.0.0-...-f17c367 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2023 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FilCmdStr        = "/FIL"
	MessageCmdStr    = "/MSG"
	NotifCmdStr      = "/NOT"
	RechercheCmdStr  = "/CRC"
	ProfilCmdStr     = "/PRO"
	AbonnementCmdStr = "/ABO"
	EditerCmdStr     = "/EDI"
	AnnuaireCmdStr   = "/ANU"
)
View Source
const (
	FilId = iota
	MessageId
	NotifId
	RechercheId
	ProfilId
	AbonnementId
	EditerId
	AnnuaireId
)
View Source
const PPActivitiesDir = "pp_activities_db"
View Source
const PPFollowsDir = "pp_follows_db"
View Source
const PPPostsDir = "pp_posts_db"
View Source
const PPUsersDir = "pp_users_db"

Variables

View Source
var PiouPiou, _ = NewPPEngine("/media/core/")

Functions

func NewPageFil

func NewPageFil(mntl *minigo.Minitel, pseudo string) *minigo.Page

func NewPageHome

func NewPageHome(mntl *minigo.Minitel) *minigo.Page

func NewPageMessage

func NewPageMessage(mntl *minigo.Minitel, pseudo string) *minigo.Page

func NewServiceCuicui

func NewServiceCuicui() int

func ParseCommandString

func ParseCommandString(cmd string) int

func PrintErrorMessage

func PrintErrorMessage(msg string) error

Types

type PPActivity

type PPActivity struct {
	Posts []string `json:"posts"`
	Feed  []string `json:"feed"`
}

type PPEngine

type PPEngine struct {
	// contains filtered or unexported fields
}

func NewPPEngine

func NewPPEngine(root string) (*PPEngine, error)

func (*PPEngine) Follow

func (p *PPEngine) Follow(src string, dst string) error

func (*PPEngine) GetFeed

func (p *PPEngine) GetFeed(pseudo string) ([]*PPPost, error)

func (*PPEngine) LogUser

func (p *PPEngine) LogUser(pseudo string) error

func (*PPEngine) LogoutUser

func (p *PPEngine) LogoutUser(pseudo string) error

func (*PPEngine) Post

func (p *PPEngine) Post(pseudo string, content string) error

func (*PPEngine) UnFollow

func (p *PPEngine) UnFollow(src string, dst string) error

type PPFollow

type PPFollow struct {
	Follows   []string `json:"follows"`
	Followers []string `json:"followers"`
}

type PPPost

type PPPost struct {
	Pseudo        string    `json:"pseudo"`
	Date          time.Time `json:"date"`
	Content       string    `json:"content"`
	DistributedTo []string  `json:"distributed_to"`
}

type PPUser

type PPUser struct {
	Pseudo      string    `json:"pseudo"`
	Bio         string    `json:"bio"`
	Tel         string    `json:"tel"`
	Location    string    `json:"location"`
	LastConnect time.Time `json:"last_connect"`
}

Jump to

Keyboard shortcuts

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