models

package
v0.0.0-...-ee1a26d Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	ID          int64
	Name        string    `binding:"required"`
	Description string    `binding:"required"`
	Location    string    `binding:"required"`
	DateTime    time.Time `binding:"required"`
	UserID      int64
}

func GetAllEvents

func GetAllEvents() ([]Event, error)

func GetEventByID

func GetEventByID(id int64) (*Event, error)

func (Event) Delete

func (event Event) Delete() error

func (*Event) Save

func (e *Event) Save() error

func (Event) Update

func (event Event) Update() error

type User

type User struct {
	ID       int64
	Email    string `binding:"required"`
	Password string `binding:"required"`
}

func (User) Save

func (u User) Save() error

func (*User) ValidateCredentials

func (u *User) ValidateCredentials() error

Jump to

Keyboard shortcuts

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