features/jwt #7
60
.drone.yaml
Normal file
60
.drone.yaml
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: buildLatestImage
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: buildLatestImage
|
||||||
|
image: plugins/docker
|
||||||
|
settings:
|
||||||
|
repo: jtom38/newsbot-collector
|
||||||
|
username: jtom38
|
||||||
|
password:
|
||||||
|
from_secret: DockerPushPat
|
||||||
|
trigger:
|
||||||
|
branch:
|
||||||
|
include:
|
||||||
|
- main
|
||||||
|
|
||||||
|
event:
|
||||||
|
exclude:
|
||||||
|
- pull_request
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: buildReleaseImage
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: buildReleaseImage
|
||||||
|
image: plugins/docker
|
||||||
|
settings:
|
||||||
|
repo: jtom38/newsbot-collector
|
||||||
|
username: jtom38
|
||||||
|
password:
|
||||||
|
from_secret: DockerPushPat
|
||||||
|
trigger:
|
||||||
|
branch:
|
||||||
|
include:
|
||||||
|
- releases/*
|
||||||
|
ref:
|
||||||
|
include:
|
||||||
|
- refs/tags/**
|
||||||
|
event:
|
||||||
|
exclude:
|
||||||
|
- pull_request
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: PullRequestCompileTest
|
||||||
|
steps:
|
||||||
|
- name: Compile project
|
||||||
|
image: golang:1.22
|
||||||
|
commands:
|
||||||
|
- go test ./internal/repository
|
||||||
|
- go build ./cmd/server.go
|
||||||
|
-
|
||||||
|
trigger:
|
||||||
|
event:
|
||||||
|
- pull_request
|
@ -1,4 +1,4 @@
|
|||||||
package respositoryservices
|
package repositoryservices
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
@ -1,4 +1,4 @@
|
|||||||
package respositoryservices
|
package repositoryservices
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
@ -4,16 +4,16 @@ import (
|
|||||||
"database/sql"
|
"database/sql"
|
||||||
|
|
||||||
"git.jamestombleson.com/jtom38/newsbot-api/internal/repository"
|
"git.jamestombleson.com/jtom38/newsbot-api/internal/repository"
|
||||||
repositoryservice "git.jamestombleson.com/jtom38/newsbot-api/internal/respositoryServices"
|
repositoryservices "git.jamestombleson.com/jtom38/newsbot-api/internal/repositoryServices"
|
||||||
)
|
)
|
||||||
|
|
||||||
type RepositoryService struct {
|
type RepositoryService struct {
|
||||||
AlertDiscord repository.AlertDiscordRepo
|
AlertDiscord repository.AlertDiscordRepo
|
||||||
Articles repository.ArticlesRepo
|
Articles repository.ArticlesRepo
|
||||||
DiscordWebHooks repository.DiscordWebHookRepo
|
DiscordWebHooks repository.DiscordWebHookRepo
|
||||||
RefreshTokens repositoryservice.RefreshToken
|
RefreshTokens repositoryservices.RefreshToken
|
||||||
Sources repository.Sources
|
Sources repository.Sources
|
||||||
Users repositoryservice.UserServices
|
Users repositoryservices.UserServices
|
||||||
UserSourceSubscriptions repository.UserSourceRepo
|
UserSourceSubscriptions repository.UserSourceRepo
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -22,9 +22,9 @@ func NewRepositoryService(conn *sql.DB) RepositoryService {
|
|||||||
AlertDiscord: repository.NewAlertDiscordRepository(conn),
|
AlertDiscord: repository.NewAlertDiscordRepository(conn),
|
||||||
Articles: repository.NewArticleRepository(conn),
|
Articles: repository.NewArticleRepository(conn),
|
||||||
DiscordWebHooks: repository.NewDiscordWebHookRepository(conn),
|
DiscordWebHooks: repository.NewDiscordWebHookRepository(conn),
|
||||||
RefreshTokens: repositoryservice.NewRefreshTokenService(conn),
|
RefreshTokens: repositoryservices.NewRefreshTokenService(conn),
|
||||||
Sources: repository.NewSourceRepository(conn),
|
Sources: repository.NewSourceRepository(conn),
|
||||||
Users: repositoryservice.NewUserService(conn),
|
Users: repositoryservices.NewUserService(conn),
|
||||||
UserSourceSubscriptions: repository.NewUserSourceRepository(conn),
|
UserSourceSubscriptions: repository.NewUserSourceRepository(conn),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user