2022-10-31 10:49:21 +00:00
|
|
|
package core
|
|
|
|
|
|
|
|
import . "rail.town/infrastructure/components/contracts"
|
|
|
|
|
|
|
|
//region IDispatcher Implementation
|
|
|
|
|
|
|
|
func (dispatcher *dispatcher) NewEchoResult(document IDocument) IEchoResult {
|
|
|
|
return NewEchoResult(document, nil)
|
|
|
|
}
|
|
|
|
|
2022-11-14 08:44:03 +00:00
|
|
|
func (dispatcher *dispatcher) NewSignupResult(token string, code string) ISignupResult {
|
|
|
|
return NewSignupResult(token, code, nil)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (dispatcher *dispatcher) NewVerifyResult(token string) IVerifyResult {
|
|
|
|
return NewVerifyResult(token, nil)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (dispatcher *dispatcher) NewLoginResult(username string, token string) ILoginResult {
|
|
|
|
return NewLoginResult(username, token, nil)
|
|
|
|
}
|
|
|
|
|
2022-11-16 09:05:26 +00:00
|
|
|
func (dispatcher *dispatcher) NewGetProfileByUserResult(username string, displayName string, avatar string, banner string, summary string, github string) IGetProfileByUserResult {
|
|
|
|
return NewGetProfileByUserResult(username, displayName, avatar, banner, summary, github, nil)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (dispatcher *dispatcher) NewUpdateProfileByUserResult(displayName string, avatar string, banner string, summary string, github string) IUpdateProfileByUserResult {
|
|
|
|
return NewUpdateProfileByUserResult(displayName, avatar, banner, summary, github, nil)
|
|
|
|
}
|
|
|
|
|
2022-11-18 07:54:37 +00:00
|
|
|
func (dispatcher *dispatcher) NewLogoutResult() ILogoutResult {
|
|
|
|
return NewLogoutResult(nil)
|
|
|
|
}
|
|
|
|
|
2022-11-21 14:14:45 +00:00
|
|
|
func (dispatcher *dispatcher) NewWebfingerResult(aliases []string, links []IActivityPubLink, subject string) IWebfingerResult {
|
|
|
|
return NewWebfingerResult(aliases, links, subject, nil)
|
|
|
|
}
|
|
|
|
|
2022-11-26 08:28:00 +00:00
|
|
|
func (dispatcher *dispatcher) NewGetActorResult(context []string, id string, followers string, following string, inbox string, outbox string, name string, preferredUsername string, type_ string, url string, icon IActivityPubMedia, image IActivityPubMedia, publicKey IActivityPubPublicKey, summary string, published string) IGetActorResult {
|
|
|
|
return NewGetActorResult(context, id, followers, following, inbox, outbox, name, preferredUsername, type_, url, icon, image, publicKey, summary, published, nil)
|
|
|
|
}
|
|
|
|
|
2022-12-02 18:37:08 +00:00
|
|
|
func (dispatcher *dispatcher) NewFollowActorResult(url string) IFollowActorResult {
|
|
|
|
return NewFollowActorResult(url, nil)
|
|
|
|
}
|
|
|
|
|
2022-12-06 08:18:31 +00:00
|
|
|
func (dispatcher *dispatcher) NewAuthorizeInteractionResult(uri string, success bool) IAuthorizeInteractionResult {
|
|
|
|
return NewAuthorizeInteractionResult(uri, success, nil)
|
|
|
|
}
|
|
|
|
|
2022-12-08 18:41:55 +00:00
|
|
|
func (dispatcher *dispatcher) NewGetFollowersResult(context string, id string, type_ string, totalItems int32, orderedItems []string, first string) IGetFollowersResult {
|
|
|
|
return NewGetFollowersResult(context, id, type_, totalItems, orderedItems, first, nil)
|
|
|
|
}
|
|
|
|
|
2022-12-12 16:16:43 +00:00
|
|
|
func (dispatcher *dispatcher) NewGetFollowingResult(context string, id string, type_ string, totalItems int32, orderedItems []string, first string) IGetFollowingResult {
|
|
|
|
return NewGetFollowingResult(context, id, type_, totalItems, orderedItems, first, nil)
|
|
|
|
}
|
|
|
|
|
2022-10-31 10:49:21 +00:00
|
|
|
//endregion
|