src

package
v0.0.0-...-17de4fb Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2023 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	POST        = 1
	LISTOFPOSTS = 2
)

Variables

This section is empty.

Functions

func CommunicateToServer

func CommunicateToServer(conn *websocket.Conn)

func ConnectWS

func ConnectWS(pass string)

func GetPost

func GetPost(name string) (post string, err error)

func ListOfPosts

func ListOfPosts() (posts []string)

Types

type Posts

type Posts struct {
	Date int64  `json:"-"`
	Name string `json:"name"`
}

type Protocol

type Protocol struct {
	ID   int    `json:"id"`
	Kind int    `json:"kind"` //1=list of posts |2=Post
	Name string `json:"name"`
}

type Response

type Response struct {
	ID    int      `json:"id"`
	Kind  int      `json:"kind"` //1=list of posts |2=Post
	Error bool     `json:"error"`
	List  []string `json:"listOfPosts"`
	Post  string   `json:"content"`
}

Jump to

Keyboard shortcuts

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