Skip to content
Permalink
Browse files

Refactoring and vendoring

  • Loading branch information...
Depado committed Nov 12, 2017
1 parent f9e2b1c commit 3470fc0685ac0b54caebc82a971dbb99a968d528
Showing with 326 additions and 702 deletions.
  1. +1 −0 .gitignore
  2. +99 −0 Gopkg.lock
  3. +46 −0 Gopkg.toml
  4. +9 −2 README.md
  5. +0 −28 admin/admin.go
  6. +0 −29 auth/auth.go
  7. +6 −6 conf/conf.go
  8. +0 −129 database/database.go
  9. +0 −194 database/database_test.go
  10. +16 −22 main.go
  11. +0 −160 models/conf.go
  12. +7 −1 models/github.go
  13. +129 −43 models/service.go
  14. +13 −13 templates/index.tmpl
  15. +0 −75 templates/login.tmpl
@@ -26,3 +26,4 @@ _testmain.go
gomonit
conf.yml
assets/custom/
vendor/

Some generated files are not rendered by default. Learn more.

@@ -0,0 +1,46 @@

# Gopkg.toml example
#
# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md
# for detailed Gopkg.toml documentation.
#
# required = ["github.com/user/thing/cmd/thing"]
# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
#
# [[constraint]]
# name = "github.com/user/project"
# version = "1.0.0"
#
# [[constraint]]
# name = "github.com/user/project2"
# branch = "dev"
# source = "github.com/myfork/project2"
#
# [[override]]
# name = "github.com/x/y"
# version = "2.4.0"


[[constraint]]
name = "github.com/Depado/conftags"
version = "1.0.0"

[[constraint]]
name = "github.com/gin-gonic/gin"
version = "1.2.0"

[[constraint]]
name = "github.com/pkg/errors"
version = "0.8.0"

[[constraint]]
name = "github.com/sirupsen/logrus"
version = "1.0.3"

[[constraint]]
name = "github.com/stretchr/testify"
version = "1.1.4"

[[constraint]]
branch = "v2"
name = "gopkg.in/yaml.v2"
@@ -5,9 +5,16 @@
[![Build Status](https://drone.depado.eu/api/badges/Depado/gomonit/status.svg)](https://drone.depado.eu/Depado/gomonit)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/Depado/bfchroma/blob/master/LICENSE)

Small soft to check if your services are running, providing a web interface.
Small soft to check if your services are running, providing a web interface.

Using gin and semantic-ui
It also integrates with Github to fetch your commits, and with drone to fetch
the build list. Other versionning system and CI system will eventually be
supported in the future.

## Note

This project is currently being refactored and is unstable. Once the refactor
is completed, a release will be issued.

## Status and Goals

This file was deleted.

This file was deleted.

@@ -18,8 +18,8 @@ type Conf struct {
Server Server `yaml:"server"`
Logger Logger `yaml:"logger"`
GithubOAuthToken string `yaml:"github_oauth_token"`
rServiceInterval string `yaml:"service_interval" default:"10m"`
rRepoInterval string `yaml:"repo_interval" default:"10m"`
RServiceInterval string `yaml:"service_interval" default:"10m"`
RRepoInterval string `yaml:"repo_interval" default:"10m"`

ServiceInterval time.Duration
RepoInterval time.Duration
@@ -38,11 +38,11 @@ func (c *Conf) Parse() error {
}
c.Logger.Configure()

if c.ServiceInterval, err = time.ParseDuration(c.rServiceInterval); err != nil {
return errors.Wrapf(err, "configuration error : couldn't parse 'service_interval' (%s)", c.rServiceInterval)
if c.ServiceInterval, err = time.ParseDuration(c.RServiceInterval); err != nil {
return errors.Wrapf(err, "configuration error: couldn't parse 'service_interval' (%s)", c.RServiceInterval)
}
if c.RepoInterval, err = time.ParseDuration(c.rRepoInterval); err != nil {
return errors.Wrapf(err, "configuration error: couldn't parse 'repo_interval' (%s)", c.rRepoInterval)
if c.RepoInterval, err = time.ParseDuration(c.RRepoInterval); err != nil {
return errors.Wrapf(err, "configuration error: couldn't parse 'repo_interval' (%s)", c.RRepoInterval)
}

return nil

This file was deleted.

0 comments on commit 3470fc0

Please sign in to comment.
You can’t perform that action at this time.