| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
This was about two hours of learning, and getting confused - and it
needs to be refactored. We need to be able to generate the list of EPs
for the Operation also.
At the moment this only prints the object representation. More work to
be done writing a method that gives us the id and textual representation
for the link in the table.
|
| |
|
|
|
|
|
|
|
|
|
| |
The data is fetched from the database and uses html/template to render
the rows in a list.
A critical bug was not including the dot in {{ template "main" . }} in
the base template. THIS MEANT THAT NO DATA PASSED TO ExecuteTemplate
function rendered and took a long time to figure out.
|
| |
|
|
|
|
|
| |
Does not contain any dynamic data at this point, i.e. does not actually
list the operations from the database - just dummy data at this point.
|
|
|
|
|
|
|
| |
This is the first attempt at querying a table with a foreign key
relation and returning the result to be used in Go code. Learned quite a
bit! Including getting a null pointer error because I forgot to
initialise the sql.DB in the application structure.
|
|
|
|
| |
And puts the list in plain text on the home page.
|
|
|
|
|
| |
Also fixes the NotAuthorised response I was mistakenly getting when it
should have been a 404.
|
|
|
|
|
|
| |
We omitted to include this earlier and it is needed for the create
handler, which creates the new entity in the database and then redirects
to the view handler which will show the organisation page.
|
|
|
|
| |
We only want "/" to match the home route; this comment explains that.
|
| |
|
|
|
|
|
|
| |
This is a straight forward wrapper around INSERT.
Also added a clientError into a new helpers.go file.
|
|
|
|
|
| |
Added a partial html for the navigation bar. So far it just has a link
to "Home" on it.
|
|
|
|
|
|
| |
There is also some basic CSS here.
Also introduced a proper structured logger.
|
| |
|
| |
|
|
Started to separate out funtionality: added an application struct and
several methods (routes(), home() and a notFound() error).
At the moment, the application struct does not carry any other
configuration objects or a database pool connection - it is just there
to get the routing going.
|