defined types and constants in different packages #515
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Moved some notifications related types and constants to different packages in order to make it easier for 3rd party services to implement gorush.
Since
gorush
package has someinit
functions (here and here), this package should not be directly imported by other projects. There is even aninit
function that registers prometheus metrics and may crash the project that tries to import the package.This PR addresses this situation by moving types and constants values to different packages that only imports safe packages (appleboy/go-fcm) which don't have any init functions.
Having structs and constants defined in importable packages makes life easier for projects that need to call GoRush API by having already created types and constants values that are fully supported by GoRush itself.