2022-10-31 10:49:21 +00:00
|
|
|
package core
|
|
|
|
|
2023-04-21 06:49:17 +00:00
|
|
|
import . "github.com/reiver/greatape/components/contracts"
|
2022-10-31 10:49:21 +00:00
|
|
|
|
|
|
|
//region IDispatcher Implementation
|
|
|
|
|
|
|
|
func (dispatcher *dispatcher) NewEchoResult(document IDocument) IEchoResult {
|
|
|
|
return NewEchoResult(document, nil)
|
|
|
|
}
|
|
|
|
|
2023-05-29 10:37:31 +00:00
|
|
|
func (dispatcher *dispatcher) NewCheckUsernameAvailabilityResult(isAvailable bool) ICheckUsernameAvailabilityResult {
|
|
|
|
return NewCheckUsernameAvailabilityResult(isAvailable, 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)
|
|
|
|
}
|
|
|
|
|
2023-05-03 18:24:05 +00:00
|
|
|
func (dispatcher *dispatcher) NewGetPackagesResult(body []byte) IGetPackagesResult {
|
2023-05-02 17:47:43 +00:00
|
|
|
return NewGetPackagesResult(body, 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)
|
|
|
|
}
|
|
|
|
|
2023-05-03 18:24:05 +00:00
|
|
|
func (dispatcher *dispatcher) NewPostToOutboxResult(body []byte) IPostToOutboxResult {
|
|
|
|
return NewPostToOutboxResult(body, nil)
|
2022-12-15 15:13:01 +00:00
|
|
|
}
|
|
|
|
|
2022-12-20 13:20:18 +00:00
|
|
|
func (dispatcher *dispatcher) NewGetOutboxResult(context string, id string, type_ string, totalItems int32, orderedItems []IActivityPubActivity, first string) IGetOutboxResult {
|
|
|
|
return NewGetOutboxResult(context, id, type_, totalItems, orderedItems, first, nil)
|
|
|
|
}
|
|
|
|
|
2023-05-03 18:24:05 +00:00
|
|
|
func (dispatcher *dispatcher) NewPostToInboxResult(body []byte) IPostToInboxResult {
|
2023-05-03 14:41:06 +00:00
|
|
|
return NewPostToInboxResult(body, nil)
|
2022-12-22 16:46:08 +00:00
|
|
|
}
|
|
|
|
|
2023-01-04 09:52:15 +00:00
|
|
|
func (dispatcher *dispatcher) NewGetInboxResult(context string, id string, type_ string, totalItems int32, orderedItems []IActivityPubActivity, first string) IGetInboxResult {
|
|
|
|
return NewGetInboxResult(context, id, type_, totalItems, orderedItems, first, nil)
|
|
|
|
}
|
|
|
|
|
2022-10-31 10:49:21 +00:00
|
|
|
//endregion
|