model

package
v0.0.0-...-e8e5fc3 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Group

type Group struct {
	GroupName    string `json:"groupname" form:"groupname"`
	Creator      string `json:"creator" form:"creator"`
	CreationDate string `json:"creationdate" form:"creationdate"`
	Description  string `json:"description" form:"description"`
	Members      []User `json:"members" form:"members"`
}

func (*Group) AddMember

func (g *Group) AddMember(u User)

func (*Group) Bind

func (g *Group) Bind(c echo.Context) (*Group, error)

func (*Group) CheckMember

func (g *Group) CheckMember(u User) bool

func (*Group) MarshalBinary

func (g *Group) MarshalBinary() ([]byte, error)

func (*Group) RemoveMember

func (g *Group) RemoveMember(username string)

func (*Group) UnmarshalBinary

func (g *Group) UnmarshalBinary(data []byte) error

type Message

type Message struct {
	Send_At   time.Time `json:"date" form:"date"`
	Sender    string    `json:"sender" form:"sender"`
	GroupName string    `json:"groupname" form:"groupname"`
	Content   string    `json:"content" form:"content"`
}

func (*Message) Bind

func (ms *Message) Bind(c echo.Context) (*Message, error)

func (*Message) MarshalBinary

func (ms *Message) MarshalBinary() ([]byte, error)

func (*Message) UnmarshalBinary

func (ms *Message) UnmarshalBinary(data []byte) error

type User

type User struct {
	Username string `json:"username" form:"username"`
	Password string `json:"password" form:"password"`
}

func (*User) Bind

func (user *User) Bind(c echo.Context) (*User, error)

Jump to

Keyboard shortcuts

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