application

package
v0.0.0-...-491220e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 25, 2024 License: MIT Imports: 6 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL