resources

package
v0.0.0-...-bcd4755 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2016 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIFormat

type APIFormat struct {
	Status    string      `json:"status"`
	Version   int         `json:"version"`
	ErrorCode int         `json:"error_code"`
	Response  interface{} `json:"response"`
}

type AccountAPI

type AccountAPI struct {
	ID    int    `json:"id"`
	Name  string `json:"name"`
	Image string `json:"image"`
}

type CommentRequest

type CommentRequest struct {
	EventID int    `json:"event_id"`
	Name    string `json:"name"`
	Body    string `json:"body"`
}

type CommentResponce

type CommentResponce struct {
	ID        int    `json:"id"`
	AccountID int    `json:"account_id"`
	Name      string `json:"name"`
	Image     string `json:"image"`
}

type EventListAPI

type EventListAPI struct {
	PrevId int             `json:"prev_id"`
	NextId int             `json:"next_id"`
	Events []EventResponse `json:"events"`
}

type EventRequest

type EventRequest struct {
	Name        string `json:"name"`
	Admin       string `json:"admin"`
	StartDate   string `json:"start_date"`
	Capacity    int    `json:"capacity"`
	Place       string `json:"place"`
	Description string `json:"description"`
	Image       string `json:"image"`
}

type EventResponse

type EventResponse struct {
	ID          int             `json:"id"`
	Name        string          `json:"name"`
	Image       string          `json:"image"`
	Capacity    int             `json:"capacity"`
	Admin       model.Member    `json:"admin"`
	Members     []model.Member  `json:"members"` // One-To-Many relationship (has many)
	StartDate   string          `json:"start_date"`
	Place       string          `json:"place"`
	Description string          `json:"description"`
	Comments    []model.Comment `json:"comments"` // One-To-Many relationship (has many)
}

type JoinRequest

type JoinRequest struct {
	EventId int    `json:"event_id"`
	Name    string `json:"name"`
}

type JoinResponce

type JoinResponce struct {
	ID        int    `json:"id"`
	AccountID int    `json:"account_id"`
	Name      string `json:"name"`
	Image     string `json:"image"`
}

type Resource

type Resource struct {
	DB *gorm.DB
}

func (*Resource) CancelEvent

func (resource *Resource) CancelEvent() echo.HandlerFunc

func (*Resource) CreateComment

func (resource *Resource) CreateComment() echo.HandlerFunc

func (*Resource) CreateEvent

func (resource *Resource) CreateEvent() echo.HandlerFunc

func (*Resource) DeleteComment

func (resource *Resource) DeleteComment() echo.HandlerFunc

func (*Resource) DeleteEvent

func (resource *Resource) DeleteEvent() echo.HandlerFunc

func (*Resource) GetAccount

func (resource *Resource) GetAccount() echo.HandlerFunc

func (*Resource) GetEvent

func (resource *Resource) GetEvent() echo.HandlerFunc

func (*Resource) GetEvents

func (resource *Resource) GetEvents() echo.HandlerFunc

func (*Resource) GetLogin

func (resource *Resource) GetLogin() echo.HandlerFunc

func (*Resource) GetOauth

func (resource *Resource) GetOauth() echo.HandlerFunc

func (*Resource) JoinEvent

func (resource *Resource) JoinEvent() echo.HandlerFunc

func (*Resource) SetDBConnection

func (resource *Resource) SetDBConnection() *gorm.DB

func (*Resource) UpdateEvent

func (resource *Resource) UpdateEvent() echo.HandlerFunc

Jump to

Keyboard shortcuts

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