model

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type NewNode

type NewNode struct {
	Name        string     `json:"name"`
	Tags        []*string  `json:"tags"`
	Access      NodeAccess `json:"access"`
	Nsfw        bool       `json:"nsfw"`
	Description *string    `json:"description"`
}

type NewPost

type NewPost struct {
	Type     PostType `json:"type"`
	Title    string   `json:"title"`
	Link     *string  `json:"link"`
	Delta    *string  `json:"delta"`
	NodeName string   `json:"nodeName"`
}

type NewUser

type NewUser struct {
	Name *string `json:"name"`
}

type Node

type Node struct {
	Name        string     `json:"name"`
	Tags        []*string  `json:"tags"`
	Access      NodeAccess `json:"access"`
	Nsfw        bool       `json:"nsfw"`
	Description *string    `json:"description"`
}

type NodeAccess

type NodeAccess string
const (
	NodeAccessPublic     NodeAccess = "public"
	NodeAccessRestricted NodeAccess = "restricted"
	NodeAccessPrivate    NodeAccess = "private"
)

func (NodeAccess) IsValid

func (e NodeAccess) IsValid() bool

func (NodeAccess) MarshalGQL

func (e NodeAccess) MarshalGQL(w io.Writer)

func (NodeAccess) String

func (e NodeAccess) String() string

func (*NodeAccess) UnmarshalGQL

func (e *NodeAccess) UnmarshalGQL(v interface{}) error

type Post

type Post struct {
	ID       string  `json:"id"`
	Title    string  `json:"title"`
	Link     *string `json:"link"`
	Delta    *string `json:"delta"`
	NodeName string  `json:"nodeName"`
}

type PostType

type PostType string
const (
	PostTypeText  PostType = "text"
	PostTypeMedia PostType = "media"
	PostTypeLink  PostType = "link"
)

func (PostType) IsValid

func (e PostType) IsValid() bool

func (PostType) MarshalGQL

func (e PostType) MarshalGQL(w io.Writer)

func (PostType) String

func (e PostType) String() string

func (*PostType) UnmarshalGQL

func (e *PostType) UnmarshalGQL(v interface{}) error

type User

type User struct {
	Name  string `json:"name"`
	Bases int    `json:"bases"`
}

Jump to

Keyboard shortcuts

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