migrate from genofire to sum7
This commit is contained in:
		
							parent
							
								
									61e52bee8b
								
							
						
					
					
						commit
						29fb1c0801
					
				| 
						 | 
					@ -1,6 +1,6 @@
 | 
				
			||||||
workspace:
 | 
					workspace:
 | 
				
			||||||
  base: /go
 | 
					  base: /go
 | 
				
			||||||
  path: src/dev.sum7.eu/genofire/logmania
 | 
					  path: src/dev.sum7.eu/sum7/logmania
 | 
				
			||||||
 | 
					
 | 
				
			||||||
pipeline:
 | 
					pipeline:
 | 
				
			||||||
  build:
 | 
					  build:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										16
									
								
								README.md
								
								
								
								
							
							
						
						
									
										16
									
								
								README.md
								
								
								
								
							| 
						 | 
					@ -1,9 +1,9 @@
 | 
				
			||||||
# logmania
 | 
					# logmania
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[](https://dev.sum7.eu/genofire/logmania/pipelines)
 | 
					[](https://dev.sum7.eu/genofire/logmania/pipelines)
 | 
				
			||||||
[](https://dev.sum7.eu/genofire/logmania/pipelines)
 | 
					[](https://dev.sum7.eu/genofire/logmania/pipelines)
 | 
				
			||||||
[](https://goreportcard.com/report/dev.sum7.eu/genofire/logmania)
 | 
					[](https://goreportcard.com/report/dev.sum7.eu/genofire/logmania)
 | 
				
			||||||
[](https://godoc.org/dev.sum7.eu/genofire/logmania)
 | 
					[](https://godoc.org/dev.sum7.eu/genofire/logmania)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
This is a little logging server.
 | 
					This is a little logging server.
 | 
				
			||||||
| 
						 | 
					@ -32,14 +32,14 @@ configuration live possible by bot (on input e.g. xmpp)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Latest Build binary from ci here:
 | 
					Latest Build binary from ci here:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[Download All](https://dev.sum7.eu/genofire/logmania/-/jobs/artifacts/master/download/?job=build-my-project) (with config example)
 | 
					[Download All](https://dev.sum7.eu/sum7/logmania/-/jobs/artifacts/master/download/?job=build-my-project) (with config example)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[Download Binary](https://dev.sum7.eu/genofire/logmania/-/jobs/artifacts/master/raw/bin/logmania?inline=false&job=build-my-project)
 | 
					[Download Binary](https://dev.sum7.eu/sum7/logmania/-/jobs/artifacts/master/raw/bin/logmania?inline=false&job=build-my-project)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#### Build
 | 
					#### Build
 | 
				
			||||||
 | 
					
 | 
				
			||||||
```bash
 | 
					```bash
 | 
				
			||||||
go get -u dev.sum7.eu/genofire/logmania
 | 
					go get -u dev.sum7.eu/sum7/logmania
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Configure
 | 
					## Configure
 | 
				
			||||||
| 
						 | 
					@ -49,4 +49,4 @@ see `config_example.toml`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Related Projects
 | 
					## Related Projects
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- [hook2xmpp](https://dev.sum7.eu/genofire/hook2xmpp) for e.g. grafana, alertmanager(prometheus), gitlab, git, circleci
 | 
					- [hook2xmpp](https://dev.sum7.eu/sum7/hook2xmpp) for e.g. grafana, alertmanager(prometheus), gitlab, git, circleci
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -3,7 +3,7 @@ package bot
 | 
				
			||||||
import (
 | 
					import (
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"dev.sum7.eu/genofire/logmania/database"
 | 
						"dev.sum7.eu/sum7/logmania/database"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func NewFilter(db *database.DB) *Command {
 | 
					func NewFilter(db *database.DB) *Command {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -3,7 +3,7 @@ package bot
 | 
				
			||||||
import (
 | 
					import (
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"dev.sum7.eu/genofire/logmania/database"
 | 
						"dev.sum7.eu/sum7/logmania/database"
 | 
				
			||||||
	timeago "github.com/ararog/timeago"
 | 
						timeago "github.com/ararog/timeago"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -3,7 +3,7 @@ package bot
 | 
				
			||||||
import (
 | 
					import (
 | 
				
			||||||
	"github.com/mattn/go-shellwords"
 | 
						"github.com/mattn/go-shellwords"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"dev.sum7.eu/genofire/logmania/database"
 | 
						"dev.sum7.eu/sum7/logmania/database"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
type Bot struct {
 | 
					type Bot struct {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -6,7 +6,7 @@ import (
 | 
				
			||||||
	"github.com/bdlm/log"
 | 
						"github.com/bdlm/log"
 | 
				
			||||||
	logstd "github.com/bdlm/std/logger"
 | 
						logstd "github.com/bdlm/std/logger"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"dev.sum7.eu/genofire/logmania/database"
 | 
						"dev.sum7.eu/sum7/logmania/database"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func NewPriority(db *database.DB) *Command {
 | 
					func NewPriority(db *database.DB) *Command {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -3,7 +3,7 @@ package bot
 | 
				
			||||||
import (
 | 
					import (
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"dev.sum7.eu/genofire/logmania/database"
 | 
						"dev.sum7.eu/sum7/logmania/database"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func NewReplace(db *database.DB) *Command {
 | 
					func NewReplace(db *database.DB) *Command {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -3,7 +3,7 @@ package bot
 | 
				
			||||||
import (
 | 
					import (
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"dev.sum7.eu/genofire/logmania/database"
 | 
						"dev.sum7.eu/sum7/logmania/database"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func NewSend(db *database.DB) *Command {
 | 
					func NewSend(db *database.DB) *Command {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -11,13 +11,13 @@ import (
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"dev.sum7.eu/genofire/golang-lib/file"
 | 
						"dev.sum7.eu/genofire/golang-lib/file"
 | 
				
			||||||
	"dev.sum7.eu/genofire/golang-lib/worker"
 | 
						"dev.sum7.eu/genofire/golang-lib/worker"
 | 
				
			||||||
	"dev.sum7.eu/genofire/logmania/bot"
 | 
						"dev.sum7.eu/sum7/logmania/bot"
 | 
				
			||||||
	"dev.sum7.eu/genofire/logmania/database"
 | 
						"dev.sum7.eu/sum7/logmania/database"
 | 
				
			||||||
	"dev.sum7.eu/genofire/logmania/input"
 | 
						"dev.sum7.eu/sum7/logmania/input"
 | 
				
			||||||
	allInput "dev.sum7.eu/genofire/logmania/input/all"
 | 
						allInput "dev.sum7.eu/sum7/logmania/input/all"
 | 
				
			||||||
	"dev.sum7.eu/genofire/logmania/lib"
 | 
						"dev.sum7.eu/sum7/logmania/lib"
 | 
				
			||||||
	"dev.sum7.eu/genofire/logmania/output"
 | 
						"dev.sum7.eu/sum7/logmania/output"
 | 
				
			||||||
	allOutput "dev.sum7.eu/genofire/logmania/output/all"
 | 
						allOutput "dev.sum7.eu/sum7/logmania/output/all"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
var (
 | 
					var (
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -3,7 +3,7 @@ package all
 | 
				
			||||||
import (
 | 
					import (
 | 
				
			||||||
	"github.com/bdlm/log"
 | 
						"github.com/bdlm/log"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"dev.sum7.eu/genofire/logmania/input"
 | 
						"dev.sum7.eu/sum7/logmania/input"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
type Input struct {
 | 
					type Input struct {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,6 +1,6 @@
 | 
				
			||||||
package all
 | 
					package all
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import (
 | 
					import (
 | 
				
			||||||
	_ "dev.sum7.eu/genofire/logmania/input/journald_json"
 | 
						_ "dev.sum7.eu/sum7/logmania/input/journald_json"
 | 
				
			||||||
	_ "dev.sum7.eu/genofire/logmania/input/syslog"
 | 
						_ "dev.sum7.eu/sum7/logmania/input/syslog"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -6,7 +6,7 @@ import (
 | 
				
			||||||
	"github.com/bdlm/log"
 | 
						"github.com/bdlm/log"
 | 
				
			||||||
	"github.com/mitchellh/mapstructure"
 | 
						"github.com/mitchellh/mapstructure"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"dev.sum7.eu/genofire/logmania/input"
 | 
						"dev.sum7.eu/sum7/logmania/input"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const inputType = "journald_json"
 | 
					const inputType = "journald_json"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -4,7 +4,7 @@ import (
 | 
				
			||||||
	"github.com/bdlm/log"
 | 
						"github.com/bdlm/log"
 | 
				
			||||||
	logstd "github.com/bdlm/std/logger"
 | 
						logstd "github.com/bdlm/std/logger"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	libSyslog "dev.sum7.eu/genofire/logmania/lib/syslog"
 | 
						libSyslog "dev.sum7.eu/sum7/logmania/lib/syslog"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
var SyslogPriorityMap = map[int]logstd.Level{
 | 
					var SyslogPriorityMap = map[int]logstd.Level{
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -6,7 +6,7 @@ import (
 | 
				
			||||||
	"github.com/bdlm/log"
 | 
						"github.com/bdlm/log"
 | 
				
			||||||
	"github.com/mitchellh/mapstructure"
 | 
						"github.com/mitchellh/mapstructure"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"dev.sum7.eu/genofire/logmania/input"
 | 
						"dev.sum7.eu/sum7/logmania/input"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const inputType = "syslog"
 | 
					const inputType = "syslog"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,7 +1,7 @@
 | 
				
			||||||
package lib
 | 
					package lib
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Struct of the configuration
 | 
					// Struct of the configuration
 | 
				
			||||||
// e.g. under dev.sum7.eu/genofire/logmania/logmania_example.conf
 | 
					// e.g. under dev.sum7.eu/sum7/logmania/logmania_example.conf
 | 
				
			||||||
type Config struct {
 | 
					type Config struct {
 | 
				
			||||||
	Debug      bool                   `toml:"debug"`
 | 
						Debug      bool                   `toml:"debug"`
 | 
				
			||||||
	DB         string                 `toml:"database"`
 | 
						DB         string                 `toml:"database"`
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										2
									
								
								main.go
								
								
								
								
							
							
						
						
									
										2
									
								
								main.go
								
								
								
								
							| 
						 | 
					@ -1,6 +1,6 @@
 | 
				
			||||||
package main
 | 
					package main
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import "dev.sum7.eu/genofire/logmania/cmd"
 | 
					import "dev.sum7.eu/sum7/logmania/cmd"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func main() {
 | 
					func main() {
 | 
				
			||||||
	cmd.Execute()
 | 
						cmd.Execute()
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -4,9 +4,9 @@ import (
 | 
				
			||||||
	"github.com/bdlm/log"
 | 
						"github.com/bdlm/log"
 | 
				
			||||||
	"time"
 | 
						"time"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"dev.sum7.eu/genofire/logmania/bot"
 | 
						"dev.sum7.eu/sum7/logmania/bot"
 | 
				
			||||||
	"dev.sum7.eu/genofire/logmania/database"
 | 
						"dev.sum7.eu/sum7/logmania/database"
 | 
				
			||||||
	"dev.sum7.eu/genofire/logmania/output"
 | 
						"dev.sum7.eu/sum7/logmania/output"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
var logger = log.WithField("notify", "all")
 | 
					var logger = log.WithField("notify", "all")
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,6 +1,6 @@
 | 
				
			||||||
package all
 | 
					package all
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import (
 | 
					import (
 | 
				
			||||||
	_ "dev.sum7.eu/genofire/logmania/output/file"
 | 
						_ "dev.sum7.eu/sum7/logmania/output/file"
 | 
				
			||||||
	_ "dev.sum7.eu/genofire/logmania/output/xmpp"
 | 
						_ "dev.sum7.eu/sum7/logmania/output/xmpp"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -8,9 +8,9 @@ import (
 | 
				
			||||||
	"github.com/bdlm/log"
 | 
						"github.com/bdlm/log"
 | 
				
			||||||
	"github.com/mitchellh/mapstructure"
 | 
						"github.com/mitchellh/mapstructure"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"dev.sum7.eu/genofire/logmania/bot"
 | 
						"dev.sum7.eu/sum7/logmania/bot"
 | 
				
			||||||
	"dev.sum7.eu/genofire/logmania/database"
 | 
						"dev.sum7.eu/sum7/logmania/database"
 | 
				
			||||||
	"dev.sum7.eu/genofire/logmania/output"
 | 
						"dev.sum7.eu/sum7/logmania/output"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const (
 | 
					const (
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -3,8 +3,8 @@ package output
 | 
				
			||||||
import (
 | 
					import (
 | 
				
			||||||
	"github.com/bdlm/log"
 | 
						"github.com/bdlm/log"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"dev.sum7.eu/genofire/logmania/bot"
 | 
						"dev.sum7.eu/sum7/logmania/bot"
 | 
				
			||||||
	"dev.sum7.eu/genofire/logmania/database"
 | 
						"dev.sum7.eu/sum7/logmania/database"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
var Register = make(map[string]Init)
 | 
					var Register = make(map[string]Init)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -8,9 +8,9 @@ import (
 | 
				
			||||||
	"gosrc.io/xmpp"
 | 
						"gosrc.io/xmpp"
 | 
				
			||||||
	"gosrc.io/xmpp/stanza"
 | 
						"gosrc.io/xmpp/stanza"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"dev.sum7.eu/genofire/logmania/bot"
 | 
						"dev.sum7.eu/sum7/logmania/bot"
 | 
				
			||||||
	"dev.sum7.eu/genofire/logmania/database"
 | 
						"dev.sum7.eu/sum7/logmania/database"
 | 
				
			||||||
	"dev.sum7.eu/genofire/logmania/output"
 | 
						"dev.sum7.eu/sum7/logmania/output"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const (
 | 
					const (
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -7,7 +7,7 @@ import (
 | 
				
			||||||
	"gosrc.io/xmpp"
 | 
						"gosrc.io/xmpp"
 | 
				
			||||||
	"gosrc.io/xmpp/stanza"
 | 
						"gosrc.io/xmpp/stanza"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"dev.sum7.eu/genofire/logmania/database"
 | 
						"dev.sum7.eu/sum7/logmania/database"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func (out *Output) Join(to string) {
 | 
					func (out *Output) Join(to string) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue