server

package
v0.0.0-...-d2428c1 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

* Copyright © 2024 Minand Manomohanan <minand.nell.mohan@gmail.com>

* Copyright © 2024 Minand Manomohanan <minand.nell.mohan@gmail.com>

* Copyright © 2024 Minand Manomohanan <minand.nell.mohan@gmail.com>

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandlerGet

func HandlerGet(c *fiber.Ctx, origin *string) error

func SetUpServer

func SetUpServer(port, origin string)

Types

type Cache

type Cache struct {
	CacheMutex sync.Mutex
	UrlMap     map[string]*Response
}

func (*Cache) CheckAndReturnSavedResponse

func (c *Cache) CheckAndReturnSavedResponse(url string) (*Response, bool)

func (*Cache) PutNewEntryInCache

func (c *Cache) PutNewEntryInCache(url string, code int, body interface{})

type Response

type Response struct {
	Code int
	Body interface{}
}

Jump to

Keyboard shortcuts

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