aboutsummaryrefslogtreecommitdiff
path: root/pkg/service/git.go
blob: 0415ceeee803e69b7e73d69b5875edd6321cfffd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package service

import "fmt"

type (
	GitService struct{}
	Repository struct {
		Name        string
		Title       string
		Description string
	}
)

func NewGitService() *GitService {
	return &GitService{}
}

func (g *GitService) ListRepositories() []*Repository {
	repos := make([]*Repository, 10)

	for i := range 10 {
		repos[i] = &Repository{
			Name:        fmt.Sprintf("repository-%d", i),
			Title:       fmt.Sprintf("Repository %d", i),
			Description: fmt.Sprintf("This is a description for repository %d", i),
		}
	}

	return repos
}