mirror of
https://github.com/akyaiy/GoSally-mvp.git
synced 2026-01-03 20:12:25 +00:00
Add configuration and v1 server implementation; create handler methods for command execution and listing
This commit is contained in:
@@ -7,7 +7,7 @@ import (
|
|||||||
|
|
||||||
"github.com/akyaiy/GoSally-mvp/internal/config"
|
"github.com/akyaiy/GoSally-mvp/internal/config"
|
||||||
"github.com/akyaiy/GoSally-mvp/internal/logs"
|
"github.com/akyaiy/GoSally-mvp/internal/logs"
|
||||||
"github.com/akyaiy/GoSally-mvp/internal/server/v1"
|
"github.com/akyaiy/GoSally-mvp/internal/v1"
|
||||||
|
|
||||||
"github.com/go-chi/chi/v5"
|
"github.com/go-chi/chi/v5"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ type HTTPServer struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type ConfigEnv struct {
|
type ConfigEnv struct {
|
||||||
ConfigPath string `env:"CONFIG_PATH" env-default:"./config/config.yaml"`
|
ConfigPath string `env:"CONFIG_PATH" env-default:"./cfg/config.yaml"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func MustLoadConfig() *ConfigConf {
|
func MustLoadConfig() *ConfigConf {
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
module github.com/akyaiy/GoSally-mvp/internal/config
|
module github.com/akyaiy/GoSally-mvp/config
|
||||||
|
|
||||||
go 1.24.4
|
go 1.24.4
|
||||||
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
module github.com/akyaiy/GoSally-mvp/internal/logs
|
|
||||||
|
|
||||||
go 1.24.4
|
|
||||||
3
logs/go.mod
Normal file
3
logs/go.mod
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
module github.com/akyaiy/GoSally-mvp/logs
|
||||||
|
|
||||||
|
go 1.24.4
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
module github.com/akyaiy/GoSally-mvp/internal/v1
|
module github.com/akyaiy/GoSally-mvp/v1
|
||||||
|
|
||||||
go 1.24.4
|
go 1.24.4
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/akyaiy/GoSally-mvp/internal/config v0.0.0-20250622085654-213db0b8c73b
|
github.com/akyaiy/GoSally-mvp/internal/config v0.0.0-20250622140114-c15e6c5b1592
|
||||||
github.com/go-chi/chi/v5 v5.2.2
|
github.com/go-chi/chi/v5 v5.2.2
|
||||||
github.com/yuin/gopher-lua v1.1.1
|
github.com/yuin/gopher-lua v1.1.1
|
||||||
)
|
)
|
||||||
@@ -3,6 +3,8 @@ github.com/BurntSushi/toml v1.5.0 h1:W5quZX/G/csjUnuI8SUYlsHs9M38FC7znL0lIO+DvMg
|
|||||||
github.com/BurntSushi/toml v1.5.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho=
|
github.com/BurntSushi/toml v1.5.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho=
|
||||||
github.com/akyaiy/GoSally-mvp/internal/config v0.0.0-20250622085654-213db0b8c73b h1:RTHso+pWhmwWLFVMCMt6ZZ5oGGh0jbOAlN8vBnD2G8o=
|
github.com/akyaiy/GoSally-mvp/internal/config v0.0.0-20250622085654-213db0b8c73b h1:RTHso+pWhmwWLFVMCMt6ZZ5oGGh0jbOAlN8vBnD2G8o=
|
||||||
github.com/akyaiy/GoSally-mvp/internal/config v0.0.0-20250622085654-213db0b8c73b/go.mod h1:VCJJWOEkisTU5IBIuNVEc2ahosMRnoVy/I/Dnf79KVM=
|
github.com/akyaiy/GoSally-mvp/internal/config v0.0.0-20250622085654-213db0b8c73b/go.mod h1:VCJJWOEkisTU5IBIuNVEc2ahosMRnoVy/I/Dnf79KVM=
|
||||||
|
github.com/akyaiy/GoSally-mvp/internal/config v0.0.0-20250622140114-c15e6c5b1592 h1:V5QzqnFoDnOVpjxMb0ZsBAX5jDaPE6OEiHxZ40/pqxM=
|
||||||
|
github.com/akyaiy/GoSally-mvp/internal/config v0.0.0-20250622140114-c15e6c5b1592/go.mod h1:VCJJWOEkisTU5IBIuNVEc2ahosMRnoVy/I/Dnf79KVM=
|
||||||
github.com/go-chi/chi/v5 v5.2.2 h1:CMwsvRVTbXVytCk1Wd72Zy1LAsAh9GxMmSNWLHCG618=
|
github.com/go-chi/chi/v5 v5.2.2 h1:CMwsvRVTbXVytCk1Wd72Zy1LAsAh9GxMmSNWLHCG618=
|
||||||
github.com/go-chi/chi/v5 v5.2.2/go.mod h1:L2yAIGWB3H+phAw1NxKwWM+7eUH/lU8pOMm5hHcoops=
|
github.com/go-chi/chi/v5 v5.2.2/go.mod h1:L2yAIGWB3H+phAw1NxKwWM+7eUH/lU8pOMm5hHcoops=
|
||||||
github.com/ilyakaznacheev/cleanenv v1.5.0 h1:0VNZXggJE2OYdXE87bfSSwGxeiGt9moSR2lOrsHHvr4=
|
github.com/ilyakaznacheev/cleanenv v1.5.0 h1:0VNZXggJE2OYdXE87bfSSwGxeiGt9moSR2lOrsHHvr4=
|
||||||
Reference in New Issue
Block a user