Versions in this module Expand all Collapse all v1 v1.0.0 May 26, 2022 Changes in this version + const ValidFilePathRegex + type ClientBuilder interface + Build func(ctx context.Context, token *oauth2.Token) *github.Client + GetOAuth2Config func() *oauth2.Config + func NewClientBuilder(oauth2Config *oauth2.Config) ClientBuilder + type GitFile struct + Content string + IsDir bool + Path string + SHA string + Size int + type GitFileProps struct + AuthorEmail string + AuthorName string + Content string + Path string + RepoDetails GitRepoProps + SHA string + type GitRepo struct + DefaultBranch string + Name string + Visibility string + type GitRepoProps struct + DefaultBranch string + Owner string + Repository string + type MockClientBuilder struct + func NewMockClientBuilder(ctrl *gomock.Controller) *MockClientBuilder + func (m *MockClientBuilder) Build(ctx context.Context, token *oauth2.Token) *github.Client + func (m *MockClientBuilder) EXPECT() *MockClientBuilderMockRecorder + func (m *MockClientBuilder) GetOAuth2Config() *oauth2.Config + type MockClientBuilderMockRecorder struct + func (mr *MockClientBuilderMockRecorder) Build(ctx, token interface{}) *gomock.Call + func (mr *MockClientBuilderMockRecorder) GetOAuth2Config() *gomock.Call + type MockService struct + func NewMockService(ctrl *gomock.Controller) *MockService + func (m *MockService) CreateRepo(ctx context.Context, ghToken oauth2.Token, repoName string) (GitRepo, error) + func (m *MockService) DeleteFile(ctx context.Context, ghToken oauth2.Token, fileProps GitFileProps) error + func (m *MockService) EXPECT() *MockServiceMockRecorder + func (m *MockService) GetAllFiles(ctx context.Context, ghToken oauth2.Token, fileProps GitFileProps) ([]GitFile, error) + func (m *MockService) GetAuthCodeURL(state string) string + func (m *MockService) GetFile(ctx context.Context, ghToken oauth2.Token, fileProps GitFileProps) (GitFile, error) + func (m *MockService) GetRepos(ctx context.Context, ghToken oauth2.Token) ([]GitRepo, error) + func (m *MockService) GetToken(ctx context.Context, code string) (oauth2.Token, error) + func (m *MockService) GetTree(ctx context.Context, ghToken oauth2.Token, fileProps GitFileProps) ([]GitFile, error) + func (m *MockService) GetUser(ctx context.Context, ghToken oauth2.Token) (github.User, error) + func (m *MockService) SaveFile(ctx context.Context, ghToken oauth2.Token, fileProps GitFileProps) (GitFile, error) + func (m *MockService) SearchFiles(ctx context.Context, ghToken oauth2.Token, fileProps GitFileProps, ...) ([]GitFile, int, error) + type MockServiceMockRecorder struct + func (mr *MockServiceMockRecorder) CreateRepo(ctx, ghToken, repoName interface{}) *gomock.Call + func (mr *MockServiceMockRecorder) DeleteFile(ctx, ghToken, fileProps interface{}) *gomock.Call + func (mr *MockServiceMockRecorder) GetAllFiles(ctx, ghToken, fileProps interface{}) *gomock.Call + func (mr *MockServiceMockRecorder) GetAuthCodeURL(state interface{}) *gomock.Call + func (mr *MockServiceMockRecorder) GetFile(ctx, ghToken, fileProps interface{}) *gomock.Call + func (mr *MockServiceMockRecorder) GetRepos(ctx, ghToken interface{}) *gomock.Call + func (mr *MockServiceMockRecorder) GetToken(ctx, code interface{}) *gomock.Call + func (mr *MockServiceMockRecorder) GetTree(ctx, ghToken, fileProps interface{}) *gomock.Call + func (mr *MockServiceMockRecorder) GetUser(ctx, ghToken interface{}) *gomock.Call + func (mr *MockServiceMockRecorder) SaveFile(ctx, ghToken, fileProps interface{}) *gomock.Call + func (mr *MockServiceMockRecorder) SearchFiles(ctx, ghToken, fileProps, query, pageNo interface{}) *gomock.Call + type Service interface + CreateRepo func(ctx context.Context, ghToken oauth2.Token, repoName string) (GitRepo, error) + DeleteFile func(ctx context.Context, ghToken oauth2.Token, fileProps GitFileProps) error + GetAllFiles func(ctx context.Context, ghToken oauth2.Token, fileProps GitFileProps) ([]GitFile, error) + GetAuthCodeURL func(state string) string + GetFile func(ctx context.Context, ghToken oauth2.Token, fileProps GitFileProps) (GitFile, error) + GetRepos func(ctx context.Context, ghToken oauth2.Token) ([]GitRepo, error) + GetToken func(ctx context.Context, code string) (oauth2.Token, error) + GetTree func(ctx context.Context, ghToken oauth2.Token, fileProps GitFileProps) ([]GitFile, error) + GetUser func(ctx context.Context, ghToken oauth2.Token) (github.User, error) + SaveFile func(ctx context.Context, ghToken oauth2.Token, fileProps GitFileProps) (GitFile, error) + SearchFiles func(ctx context.Context, ghToken oauth2.Token, fileProps GitFileProps, ...) ([]GitFile, int, error) + func NewService(clientBuilder ClientBuilder) Service