fmodels

package
v0.0.0-...-a4d7632 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2021 License: CC0-1.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	RespBadRequest = ApiResponse{
		Status:  "Failed",
		Message: "There was an error processing the request, please check request format",
	}
)

Functions

This section is empty.

Types

type ApiResponse

type ApiResponse struct {
	Status string `json:"status"`

	Message string `json:"message"`

	Response *string `json:"response"`
}

func BuildErrorResponse

func BuildErrorResponse(status string, err error) ApiResponse

type Context

type Context struct {
	Name string `json:"name"`

	Year string `json:"year"`
}

type Creator

type Creator struct {
	Id int64 `json:"id,omitempty"`

	Name string `json:"name,omitempty"`

	// list of links
	Links []Link `json:"links,omitempty"`
	// contains filtered or unexported fields
}

func (Creator) FromModel

func (c Creator) FromModel(creator models.Creator) Creator
func (c Creator) SetLinks() Creator

type CreatorWrapper

type CreatorWrapper struct {
	Status string `json:"status"`

	Message string `json:"message"`

	Response Creator `json:"response"`
}

type CreatorsWrapper

type CreatorsWrapper struct {
	Status string `json:"status"`

	Message string `json:"message"`

	// response with all of the languages in the system
	Response []Creator `json:"response"`
}

type Language

type Language struct {
	Cont Context `json:"@context"`

	Id int64 `json:"id,omitempty"`

	Name string `json:"name"`

	Year int32 `json:"year"`

	Wikipedia string `json:"wikipedia"`

	Imperative bool `json:"imperative"`

	ObjectOriented bool `json:"objectOriented"`

	Functional bool `json:"functional"`

	Procedural bool `json:"procedural"`

	Generic bool `json:"generic"`

	Reflective bool `json:"reflective"`

	Creators []Creator `json:"creators"`

	// list of links
	Links []Link `json:"links"`

	Slika string `json:"slika"`
}

func (Language) FromModel

func (l Language) FromModel(language models.Language) Language
func (l Language) SetLinks() Language

type LanguageWrapper

type LanguageWrapper struct {
	Status string `json:"status"`

	Message string `json:"message"`

	Response Language `json:"response"`
}

type LanguagesWrapper

type LanguagesWrapper struct {
	Status string `json:"status"`

	Message string `json:"message"`

	// response with all of the languages in the system
	Response []Language `json:"response"`
}
type Link struct {
	Href string `json:"href"`

	Rel string `json:"rel"`

	Type string `json:"type"`
}

type WikiResponse

type WikiResponse struct {
	Handle string `json:"handle"`

	// list of links
	Links []Link `json:"links"`
	// contains filtered or unexported fields
}

func (WikiResponse) FromModel

func (w WikiResponse) FromModel(language models.Language) WikiResponse
func (w WikiResponse) SetLinks() WikiResponse

type WikiResponseWrapper

type WikiResponseWrapper struct {
	Status string `json:"status"`

	Message string `json:"message"`

	Response WikiResponse `json:"response"`
}

Jump to

Keyboard shortcuts

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