Skip to content

Commit

Permalink
Refactoring and vendoring
Browse files Browse the repository at this point in the history
  • Loading branch information
Depado committed Nov 12, 2017
1 parent f9e2b1c commit 3470fc0
Show file tree
Hide file tree
Showing 15 changed files with 326 additions and 702 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -26,3 +26,4 @@ _testmain.go
gomonit
conf.yml
assets/custom/
vendor/
99 changes: 99 additions & 0 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 46 additions & 0 deletions Gopkg.toml
@@ -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"
11 changes: 9 additions & 2 deletions README.md
Expand Up @@ -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

Expand Down
28 changes: 0 additions & 28 deletions admin/admin.go

This file was deleted.

29 changes: 0 additions & 29 deletions auth/auth.go

This file was deleted.

12 changes: 6 additions & 6 deletions conf/conf.go
Expand Up @@ -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
Expand All @@ -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
Expand Down
129 changes: 0 additions & 129 deletions database/database.go

This file was deleted.

0 comments on commit 3470fc0

Please sign in to comment.