Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct {
// contains filtered or unexported fields
}
Application is the main entry struct for the program.
func NewApplication ¶
func NewApplication(cfg *config.Config, githubService GitHubService) *Application
NewApplication is a factory function that returns Application with the dependency.
func (*Application) GetConfigFromGitHub ¶
func (app *Application) GetConfigFromGitHub() config.Config
GetConfigFromGitHub fetches members and admins based on the GitHub server information.
func (*Application) Update ¶
func (app *Application) Update(dryRun bool) error
Update will actually invite users unless dryRun is true. In case of dryRun, it will just print without calling the server.
type GitHubService ¶
type GitHubService interface { RemoveMembers(members []string) error AddAdmins(admins []string) error AddMembers(members []string) error ListMembersByRole(role enums.Role) ([]*github.User, error) }
GitHubService is a dependency used by Application. It wraps the implementation so that it's easier to test.
Directories
¶
Path | Synopsis |
---|---|
Package mock_application is a generated GoMock package.
|
Package mock_application is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.