Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/datasektionen/gordian
https://en.wikipedia.org/wiki/Gordian_Knot
https://github.com/datasektionen/gordian
Last synced: 2 months ago
JSON representation
https://en.wikipedia.org/wiki/Gordian_Knot
- Host: GitHub
- URL: https://github.com/datasektionen/gordian
- Owner: datasektionen
- License: other
- Created: 2024-02-22T21:18:11.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-10-16T21:04:01.000Z (3 months ago)
- Last Synced: 2024-10-18T20:38:02.966Z (3 months ago)
- Language: Go
- Size: 1.32 MB
- Stars: 2
- Watchers: 6
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Budgetsystemet GOrdian
Fullstack Golang application that handles the budget of Datasektionen.
Live at [budget.datasektionen.se](https://budget.datasektionen.se).
# API
**API documentation** can be found here: **Look down**
## List all Cost Centres
GET
/api/CostCentres
(gets all CCs)
### Parameters
None
### Responses
```JSON
[
{
"CostCentreID":21,
"CostCentreName":"Ada",
"CostCentreType":"committee"
}
]
```## List all Secondary Cost Centres of a Cost Centre
GET
/api/SecondaryCostCentres?id={CCid}
(gets all SCC given CC id)
### Parameters
> | name | type | data type | description |
> |--------|-----------|----------------|----------------------------------|
> | `CCid` | required | int ($int64) | The id of a specific Cost Centre |### Responses
```JSON
[
{
"CostCentreID":1,
"SecondaryCostCentreID":3,
"SecondaryCostCentreName":"Allmänt"
}
]
```## List all Budget Lines of a Secondary Cost Centre
GET
/api/BudgetLines?id={SCCid}
(gets all Budget Lines given SCC id)
### Parameters
> | name | type | data type | description |
> |---------|-----------|----------------|--------------------------------------------|
> | `SCCid` | required | int ($int64) | The id of a specific Secondary Cost Centre |### Responses
```JSON
[
{"SecondaryCostCentreID":3,
"BudgetLineID":33,
"BudgetLineName":"Mat till planeringsmöten",
"BudgetLineAccount":"4029",
"BudgetLineIncome":0,
"BudgetLineExpense":-4400,
"BudgetLineComment":"Ny för i år, 4"
}
]
```# Local
- Clone repo
- Install docker
- Install PostgreSQL
- Create database and user in psql according to env.go
- Make user superuser
- Schemify database with .sql file
- Ask dsys for GOrdian token
- Ask dsys for pls access
- Create dockerimage
- Run dockerimage# Entities
Each entry in the system consists of the following entities.
There are three elementary entities in the
system, Cost centres, Secondary cost centres and Budget lines.## Cost Centre
A *Cost Centre* is called *Resultatställe* in Swedish. It can be typed as a Project (Projekt), Committee (Nämnd) or Other (Övrigt).
They are the main budget divisions.## Secondary cost centre
A *Secondary cost centre* is part of a Cost centre. It can be an event or otherwise differentiable part of the Cost centre.
Each Secondary cost centre contains the Cost centre it is connected to.## Budget line
A *Budget line* is the smallest part of a budget, belonging to a Secondary cost centre.
Each Budget line centre contains the Secondary cost centre it is connected to.
A Budget Line also contains the following.### Income and Expense
The prediction of what someone expects to earn or spend.
A Budget Line never has an Income and an Expense at the same time.### Account
*Account* is used to assist with the bookkeeping### Comment
A *Comment* is used to further clarify the use of a Budget line## Very nice money budget