utils

package module
v0.0.0-...-51de1f6 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2021 License: Apache-2.0 Imports: 13 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeConfiguration

func DecodeConfiguration(file string, dst interface{}) error

func DecodeJSONBody

func DecodeJSONBody(w http.ResponseWriter, r *http.Request, dst interface{}) error

func FileExists

func FileExists(filename string) bool

func ReadMap

func ReadMap(filename string) (map[string]string, error)

ReadMap Reads a file with key/value pairs and converts it to a map

Types

type Client

type Client struct {
	Mutex sync.Mutex

	ServerAdress string
	// contains filtered or unexported fields
}

func (*Client) Call

func (c *Client) Call(serviceMethod string, args interface{}, reply interface{}) error

func (*Client) Close

func (c *Client) Close()

type MalformedRequest

type MalformedRequest struct {
	Status int
	Msg    string
}

func (*MalformedRequest) Error

func (mr *MalformedRequest) Error() string

type Route

type Route struct {
	Name        string
	Method      string
	Pattern     string
	HandlerFunc http.HandlerFunc
}

Route a route

type Routes

type Routes []Route

Routes a list of routes

Jump to

Keyboard shortcuts

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