util

package
v0.0.0-...-1124c96 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

This contains all the utility functions necesssary.

This is done to remove recursive imports mainly.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateRandomString

func GenerateRandomString(len int) string

func GetData

func GetData(conn net.Conn) string

func GetString

func GetString(input []string) string

func GetStringAndAppend

func GetStringAndAppend(arr []string, data []string) []string

func GetStringArr

func GetStringArr(input []string, decider int) []string

func RandomInt

func RandomInt(min, max int) int

func RenderPage

func RenderPage(w http.ResponseWriter, pageName string)

func SendData

func SendData(conn net.Conn, message []string)

Types

type RoomData

type RoomData struct {
	RoomName string
	Members  []string
	RoomID   string
	Admins   []string
}

type UserData

type UserData struct {
	LoggedIn string
	UserName string
	Password string
	PhoneNo  string
	OTP      string
	ID       string
	Auth     bool
	Rooms    []RoomData
	Admin    bool
}

Jump to

Keyboard shortcuts

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