model

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2022 License: MIT Imports: 6 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddMockData

func AddMockData() (err error)

Add initialized mocked data for development

func AddNewConfInfo

func AddNewConfInfo(confInfo *ConfInfo) (err error)

POST /api/v1/confInfos Create a ConfInfo in

func DeleteUserFromTopic

func DeleteUserFromTopic(topic string, userId string, confInfo *ConfInfo) (err error)

DELETE /api/v1/topicMode/confInfos/:topic/users/:userUrl Delete a user from a ConfInfo using his userUrl

func GetAllConfInfos

func GetAllConfInfos(confInfos *[]ConfInfo) (err error)

GET /api/v1/confInfos Get all ConfInfos

func GetConfInfoById

func GetConfInfoById(confId string, confInfo *ConfInfo) (err error)

GET /api/v1/confInfos/:id Get a ConfInfo by its id

func GetConfInfoByTopic

func GetConfInfoByTopic(topic string, confInfo *ConfInfo) (err error)

GET /api/v1/confInfos/:topic Get a ConfInfo by its topic which equals to its subject field

func GetTopicInfo

func GetTopicInfo(topic string, confInfo *ConfInfo) (err error)

GET /api/v1/topicMode/confInfos/:topic Get all information related to a Topic An alternative way for GET /api/v1/confInfos/?topic

func PatchUserToTopic

func PatchUserToTopic(topic string, newUser User, confInfo *ConfInfo) (err error)

PATCH /api/v1/topicMode/confInfos/:topic Patch a new User to a ConfInfo using a Topic

Types

type ConfInfo

type ConfInfo struct {
	gorm.Model
	ConfUri string
	Subject string
	Users   []User `gorm:"foreignKey:ConfRefer"`
}

Conference Information

type InputConfInfo

type InputConfInfo struct {
	ConfUri string
	Subject string
	Users   []User
}

Input for mocking ConfInfo

type InputConfInfos

type InputConfInfos struct {
	Data []ConfInfo
}

Input for mocking ConfInfos

type User

type User struct {
	UserID    uint `gorm:"primary_key"`
	EntityUrl string
	Role      string
	ConfRefer uint
}

User in a conference

Jump to

Keyboard shortcuts

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