+ License

* Migrated to github
This commit is contained in:
Daniel Legt 2024-01-22 00:36:05 +02:00
parent cdbab95930
commit b4574eb73d
10 changed files with 36 additions and 15 deletions

13
LICENSE Normal file
View File

@ -0,0 +1,13 @@
Copyright [2024] [Daniel Legt]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@ -45,3 +45,11 @@ Currently the program does not depend on any hardware library as I couldn't find
### Why not just run as root?
I really, really, **really** want to avoid asking people to run **ANY** program I write as root and even try and prevent that from happening since that's how things can go bad, especially because I am runnig actions over hardware items. I think you can see how easy it is for a mistake or a **malicious attack** to easily deal damage
## Support & Contribution
For support, bug reports, or feature requests, please open an issue on the [GitHub repository](https://github.com/JustKato/drive-health/issues). Contributions are welcome! Fork the repository, make your changes, and submit a pull request.
## License
This project is licensed under the [Apache License 2.0](./LICENSE).

2
go.mod
View File

@ -1,4 +1,4 @@
module tea.chunkbyte.com/kato/drive-health
module github.com/JustKato/drive-health
go 1.21.6

View File

@ -8,8 +8,8 @@ import (
"strings"
"time"
"github.com/JustKato/drive-health/lib/config"
"gorm.io/gorm"
"tea.chunkbyte.com/kato/drive-health/lib/config"
)
func GetSystemHardDrives(db *gorm.DB, olderThan *time.Time, newerThan *time.Time) ([]*HardDrive, error) {

View File

@ -5,11 +5,11 @@ import (
"fmt"
"time"
"github.com/JustKato/drive-health/lib/config"
"github.com/JustKato/drive-health/lib/hardware"
"github.com/wcharczuk/go-chart/v2"
"gorm.io/driver/sqlite"
"gorm.io/gorm"
"tea.chunkbyte.com/kato/drive-health/lib/config"
"tea.chunkbyte.com/kato/drive-health/lib/hardware"
)
var db *gorm.DB

View File

@ -4,8 +4,8 @@ import (
"fmt"
"time"
"tea.chunkbyte.com/kato/drive-health/lib/config"
"tea.chunkbyte.com/kato/drive-health/lib/hardware"
"github.com/JustKato/drive-health/lib/config"
"github.com/JustKato/drive-health/lib/hardware"
)
// Delete all thermal entries that are older than X amount of seconds

View File

@ -5,9 +5,9 @@ import (
"strconv"
"time"
"github.com/JustKato/drive-health/lib/hardware"
"github.com/JustKato/drive-health/lib/svc"
"github.com/gin-gonic/gin"
"tea.chunkbyte.com/kato/drive-health/lib/hardware"
"tea.chunkbyte.com/kato/drive-health/lib/svc"
)
func setupApi(r *gin.Engine) {

View File

@ -6,9 +6,9 @@ import (
"strconv"
"time"
"github.com/JustKato/drive-health/lib/hardware"
"github.com/JustKato/drive-health/lib/svc"
"github.com/gin-gonic/gin"
"tea.chunkbyte.com/kato/drive-health/lib/hardware"
"tea.chunkbyte.com/kato/drive-health/lib/svc"
)
func setupFrontend(r *gin.Engine) {

View File

@ -1,8 +1,8 @@
package web
import (
"github.com/JustKato/drive-health/lib/config"
"github.com/gin-gonic/gin"
"tea.chunkbyte.com/kato/drive-health/lib/config"
)
func SetupRouter() *gin.Engine {

View File

@ -9,10 +9,10 @@ import (
"syscall"
"time"
"github.com/JustKato/drive-health/lib/config"
"github.com/JustKato/drive-health/lib/svc"
"github.com/JustKato/drive-health/lib/web"
"github.com/joho/godotenv"
"tea.chunkbyte.com/kato/drive-health/lib/config"
"tea.chunkbyte.com/kato/drive-health/lib/svc"
"tea.chunkbyte.com/kato/drive-health/lib/web"
)
func main() {