model

package
v0.0.0-...-c33e8bb Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MarshalID

func MarshalID(v primitive.ObjectID) graphql.Marshaler

MarshalID ...

func MarshalTimestamp

func MarshalTimestamp(t time.Time) graphql.Marshaler

MarshalTimestamp ...

func UnmarshalID

func UnmarshalID(v interface{}) (primitive.ObjectID, error)

UnmarshalID ...

func UnmarshalTimestamp

func UnmarshalTimestamp(v interface{}) (time.Time, error)

UnmarshalTimestamp ...

Types

type Comic

type Comic struct {
	ID        primitive.ObjectID `bson:"_id"`
	Name      string             `bson:"name"`
	CreatedAt time.Time          `bson:"created_at,omitempty"`
	UpdatedAt time.Time          `bson:"updated_at,omitempty"`
}

Comic merepresentasikan objek komik

type ComicConnection

type ComicConnection struct {
	BaseQuery   primitive.M
	Skip, Limit int
}

ComicConnection hold data required to build ComicConnection on graphql

type ComicEdge

type ComicEdge struct {
	Cursor string `json:"cursor"`
	Node   *Comic `json:"node"`
}

type Episode

type Episode struct {
	ID        primitive.ObjectID `bson:"_id"`
	ComicID   primitive.ObjectID `bson:"comic_id"`
	No        int                `bson:"no"`
	Name      string             `bson:"name"`
	CreatedAt time.Time          `bson:"created_at,omitempty"`
	UpdatedAt time.Time          `bson:"updated_at,omitempty"`
}

Episode ...

type EpisodeConnection

type EpisodeConnection struct {
	ComicID    primitive.ObjectID
	Pagination pagination.Interface
}

EpisodeConnection hold data required to build EpisodeConnection on graphql

type EpisodeEdge

type EpisodeEdge struct {
	Cursor string   `json:"cursor"`
	Node   *Episode `json:"node"`
}

type Page

type Page struct {
	ID        primitive.ObjectID `json:"ID" bson:"_id"`
	EpisodeID primitive.ObjectID `json:"episodeID" bson:"episode_id"`
	SourceID  primitive.ObjectID `json:"sourceID" bson:"source_id"`
	Link      string             `json:"link" bson:"link"`
	CreatedAt time.Time          `json:"createdAt" bson:"created_at,omitempty"`
	UpdatedAt time.Time          `json:"updatedAt" bson:"updated_at,omitempty"`
}

Page ...

type PageInfo

type PageInfo struct {
	StartCursor string `json:"startCursor"`
	HasNextPage bool   `json:"hasNextPage"`
}

type Source

type Source struct {
	ID        primitive.ObjectID `bson:"_id"`
	Name      string             `bson:"name"`
	Hostname  string             `bson:"hostname"`
	CreatedAt time.Time          `bson:"created_at,omitempty"`
	UpdatedAt time.Time          `bson:"updated_at,omitempty"`
}

Source ...

type SourceCreatePayload

type SourceCreatePayload struct {
	Source    *Source      `json:"source"`
	UserError []*UserError `json:"userError"`
}

type SourceDeletePayload

type SourceDeletePayload struct {
	Source    *Source      `json:"source"`
	UserError []*UserError `json:"userError"`
}

type SourceInput

type SourceInput struct {
	Name     string `json:"name"`
	Hostname string `json:"hostname"`
}

type Update

type Update struct {
	ComicName   string `json:"comicName"`
	EpisodeLink string `json:"episodeLink"`
	EpisodeName string `json:"episodeName"`
	EpisodeNo   int    `json:"episodeNo"`
	SourceID    string `json:"sourceID"`
}

Update ...

type UserError

type UserError struct {
	Message string   `json:"message"`
	Field   []string `json:"field"`
}

Jump to

Keyboard shortcuts

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