dictionary

package
v0.0.0-...-1ae8f5d Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteDictionary

func DeleteDictionary(c *fiber.Ctx) error

func GetDictionaries

func GetDictionaries(c *fiber.Ctx) error

func GetDictionary

func GetDictionary(c *fiber.Ctx) error

func NewDictionary

func NewDictionary(c *fiber.Ctx) error

func Setup

func Setup()

func UpdateDictionary

func UpdateDictionary(c *fiber.Ctx) error

Types

type Dictionary

type Dictionary struct {
	gorm.Model
	UserID             uint               `json:"user_id"`
	DictionaryLanguage DictionaryLanguage `json:"language"`
}

type DictionaryLanguage

type DictionaryLanguage struct {
	gorm.Model
	DictionaryID uint   `json:"dictionary_id"`
	English      string `gorm:"size:255" json:"english" validate:"required"`
	Chinese      string `gorm:"size:255" json:"chinese" validate:"required"`
}

type ErrorResponse

type ErrorResponse struct {
	FailedField string
	Tag         string
	Value       string
}

func ValidateStruct

func ValidateStruct(input interface{}) []*ErrorResponse

Jump to

Keyboard shortcuts

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