networking

package
v0.0.0-...-61cbdb0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2017 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package networking contains various functions used to communicate between networks and draw data from the client network.

Package networking contains various functions used to communicate between networks and draw data from the client network.

Index

Constants

View Source
const (
	ACCOUNT_USER_AUTH = "gpanel-account-user-auth"
	SERVER_USER_AUTH  = "gpanel-server-user-auth"
)

Variables

This section is empty.

Functions

func GetClientIP

func GetClientIP() ([]byte, error)

GetClientIP returns the current client's IP as an array of bytes. BUG(george-e-shaw-iv) Uses an external API

Types

type Store

type Store struct {
	// contains filtered or unexported fields
}

func GetStore

func GetStore(name string) Store

GetStore function takes a name and either creates/grabs a store with that name.

func (*Store) Delete

func (s *Store) Delete(res http.ResponseWriter, req *http.Request) error

Delete function is attached to the store struct and will delete a given session value inside of the current store.

func (*Store) Read

func (s *Store) Read(res http.ResponseWriter, req *http.Request, key string) (interface{}, error)

Read function is attached to the store struct and will read a given session value inside of the current store.

func (*Store) Set

func (s *Store) Set(res http.ResponseWriter, req *http.Request, key string, value interface{}, expire int) error

Set function is attached to the store struct and will set a session value inside of the current store.

Notes

Bugs

  • Uses an external API

Jump to

Keyboard shortcuts

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