features/jwt #7

Merged
jtom38 merged 10 commits from features/jwt into main 2024-05-07 22:21:58 -07:00
4 changed files with 67 additions and 7 deletions
Showing only changes of commit e38643938a - Show all commits

60
.drone.yaml Normal file
View 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

View File

@ -1,4 +1,4 @@
package respositoryservices package repositoryservices
import ( import (
"context" "context"

View File

@ -1,4 +1,4 @@
package respositoryservices package repositoryservices
import ( import (
"context" "context"

View File

@ -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),
} }
} }