Permalink
Browse files

service permalink - tests - dev docs

  • Loading branch information...
hunterlong committed Feb 6, 2019
1 parent 69b3cb4 commit f9b6c1f54eed52d6becf6a8c9fa36bbd9b8abb42

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

Oops, something went wrong.
@@ -43,7 +43,7 @@

[[constraint]]
name = "github.com/gorilla/mux"
version = "1.6.2"
version = "1.7.0"

[[constraint]]
name = "github.com/gorilla/sessions"
@@ -63,7 +63,7 @@

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

[[constraint]]
branch = "master"
@@ -80,9 +80,3 @@
[prune]
go-tests = true
unused-packages = true

[metadata.heroku]
root-package = "github.com/hunterlong/statping"
go-version = "1.11"
install = [ "./cmd" ]
additional-tools = ["github.com/GeertJohan/go.rice/..."]
@@ -98,15 +98,18 @@ coverage:

# generate documentation for Statping functions
docs:
godoc2md -ex github.com/hunterlong/statping >> dev/README.md
godoc2md -ex github.com/hunterlong/statping/cmd >> dev/README.md
godoc2md -ex github.com/hunterlong/statping/core > dev/README.md
godoc2md -ex github.com/hunterlong/statping/handlers >> dev/README.md
godoc2md -ex github.com/hunterlong/statping/notifiers >> dev/README.md
godoc2md -ex github.com/hunterlong/statping/plugin >> dev/README.md
godoc2md -ex github.com/hunterlong/statping/source >> dev/README.md
godoc2md -ex github.com/hunterlong/statping/types >> dev/README.md
godoc2md -ex github.com/hunterlong/statping/utils >> dev/README.md
rm -f dev/README.md
printf "# Statping Dev Documentation\n" > dev/README.md
printf "This readme is automatically generated from the Golang documentation. [![GoDoc](https://godoc.org/github.com/golang/gddo?status.svg)](https://godoc.org/github.com/hunterlong/statping)\n\n" > dev/README.md
godocdown github.com/hunterlong/statping >> dev/README.md
godocdown github.com/hunterlong/statping/cmd >> dev/README.md
godocdown github.com/hunterlong/statping/core >> dev/README.md
godocdown github.com/hunterlong/statping/handlers >> dev/README.md
godocdown github.com/hunterlong/statping/notifiers >> dev/README.md
godocdown github.com/hunterlong/statping/plugin >> dev/README.md
godocdown github.com/hunterlong/statping/source >> dev/README.md
godocdown github.com/hunterlong/statping/types >> dev/README.md
godocdown github.com/hunterlong/statping/utils >> dev/README.md
gocov-html coverage.json > dev/COVERAGE.html
revive -formatter stylish > dev/LINT.md

@@ -215,6 +218,7 @@ dev-deps:
$(GOGET) github.com/mattn/goveralls
$(GOINSTALL) github.com/mattn/goveralls
$(GOGET) github.com/rendon/testcli
$(GOGET) github.com/robertkrimen/godocdown/godocdown
$(GOGET) github.com/karalabe/xgo
$(GOGET) github.com/GeertJohan/go.rice
$(GOGET) github.com/GeertJohan/go.rice/rice
@@ -39,6 +39,7 @@ func InsertSampleData() error {
Timeout: 10,
Order: 1,
GroupId: 1,
Permalink: types.NewNullString("google"),
CreatedAt: createdOn,
})
s2 := ReturnService(&types.Service{
@@ -50,6 +51,7 @@ func InsertSampleData() error {
Method: "GET",
Timeout: 20,
Order: 2,
Permalink: types.NewNullString("statping_github"),
CreatedAt: createdOn,
})
s3 := ReturnService(&types.Service{
@@ -55,6 +55,16 @@ func SelectService(id int64) *Service {
return nil
}

// SelectServiceLink returns a *core.Service from the service permalink
func SelectServiceLink(permalink string) *Service {
for _, s := range Services() {
if s.Select().Permalink.String == permalink {
return s.(*Service)
}
}
return nil
}

// CheckinProcess runs the checkin routine for each checkin attached to service
func (s *Service) CheckinProcess() {
checkins := s.AllCheckins()

Large diffs are not rendered by default.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit f9b6c1f

Please sign in to comment.