banners.server

command module
v0.0.0-...-c40a58b Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2019 License: MIT Imports: 7 Imported by: 0

README

banners.server

/cms/banners/?language=?;pageId=?;deviceId=?

Repository for Go and Echo experimentation

The goal of this PoC is to set up an endpoint that allows to fetch data from a local database (MSSQL).

It is composed of four packages:

  • banners.server -> package main
This package contains the Main() function.
In here the Echo framework set up the endpoint specifying the route value and the the query parameters.
In the enpoint.go file is possible to specify if a new dataset should not be created by 
commenting out the database.Seed() instruction.

This package contains also a test called endpoint_test.go which test the correctness of the 
GetBanners() function.
  • banners.database -> package database
This package contains all database-related functions, along with the query.go file 
where the queries and the database connection string are stored.
  • banners.domain -> package domain
This package contains all domain-specific structs. It doesn't depend on any package
  • banners.utils -> package utils
This package contains all custom generic tasks functions used in code

The dependencies of this packages are arrenged as in figure:

Screenshot

Dependencies point to the center of the circle, where the high-level policies resides.

TO FIX

Currently, the stored procedure that gather the data from the database accept an output parameter, but it always returns no value. Not found enough information on any documentation / stackoverflow question / github issues to solve this issue yet.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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