feat(service): expand service layer with new domain operations
- Add IM service modules: audit, channel roles, custom emojis, forum tags, integrations, invitations, repo links, slash commands, stages, voice, webhooks - Add PR service modules: review requests, templates - Add repo service modules: contributors, release assets, git extras (archive, branch rename, commit extras, diff/merge, tag, tree) - Add user service: social (follow/block) - Add internal auth service - Update existing service modules with expanded functionality - Remove deleted IM modules: articles, delivery trace, drafts, follows, messages, polls, presence, reactions, threads
This commit is contained in:
@@ -16,6 +16,7 @@ pub mod util;
|
||||
|
||||
pub mod auth;
|
||||
pub mod im;
|
||||
pub mod internal_auth;
|
||||
pub mod issues;
|
||||
pub mod notify;
|
||||
pub mod pr;
|
||||
@@ -62,6 +63,7 @@ pub struct NotificationService {
|
||||
}
|
||||
|
||||
pub use im::ImService;
|
||||
pub use internal_auth::InternalAuthService;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct AppService {
|
||||
@@ -73,6 +75,7 @@ pub struct AppService {
|
||||
pub pr: PrService,
|
||||
pub notify: NotificationService,
|
||||
pub im: ImService,
|
||||
pub internal_auth: InternalAuthService,
|
||||
pub ctx: Arc<ServiceContext>,
|
||||
}
|
||||
|
||||
@@ -88,6 +91,8 @@ impl AppService {
|
||||
registry: Arc<EtcdRegistry>,
|
||||
nats: Arc<NatsQueue>,
|
||||
) -> Self {
|
||||
let internal_auth = InternalAuthService::new(redis.clone());
|
||||
|
||||
let ctx = Arc::new(ServiceContext {
|
||||
version,
|
||||
db,
|
||||
@@ -109,6 +114,7 @@ impl AppService {
|
||||
pr: PrService { ctx: ctx.clone() },
|
||||
notify: NotificationService { ctx: ctx.clone() },
|
||||
im: ImService { ctx: ctx.clone() },
|
||||
internal_auth,
|
||||
ctx,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user