modal

package
v0.0.0-...-b026736 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Availability = graphql.NewObject(
	graphql.ObjectConfig{
		Name: "Availability",
		Fields: graphql.Fields{
			"location": &graphql.Field{Type: graphql.String},
			"id":       &graphql.Field{Type: graphql.Int},
		},
		Description: "Users data",
	},
)
View Source
var Book = graphql.NewObject(
	graphql.ObjectConfig{
		Name: "Books",
		Fields: graphql.Fields{
			"id":           &graphql.Field{Type: graphql.ID},
			"bookName":     &graphql.Field{Type: graphql.String},
			"details":      &graphql.Field{Type: Details},
			"availability": &graphql.Field{Type: graphql.NewList(Availability)},
			"available":    &graphql.Field{Type: graphql.Boolean},
		},
		Description: "Book",
	},
)
View Source
var Details = graphql.NewObject(
	graphql.ObjectConfig{
		Name: "Details",
		Fields: graphql.Fields{
			"author": &graphql.Field{Type: graphql.String},
			"seller": &graphql.Field{Type: graphql.String},
		},
		Description: "Details",
	},
)

Functions

This section is empty.

Types

type AvailabilityModal

type AvailabilityModal struct {
	ID       int    `json:"id"`
	Location string `json:"location"`
}

type BookModal

type BookModal struct {
	ID           int                 `json:"id"`
	BookName     string              `json:"bookName"`
	Details      DetailsModal        `json:"details"`
	Available    bool                `json:"available"`
	Availability []AvailabilityModal `json:"availability"`
}

type DetailsModal

type DetailsModal struct {
	Author string `json:"author"`
	Seller string `json:"seller"`
}

type PostBook

type PostBook struct {
	BookName  *string `json:"bookName"`
	Available *bool   `json:"available"`
	Location  *string `json:"location"`
	Author    *string `json:"author"`
	Seller    *string `json:"seller"`
}

Jump to

Keyboard shortcuts

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