Add some conifguration and logging for the hub
This commit is contained in:
27
registrar/internal/services/repo.go
Normal file
27
registrar/internal/services/repo.go
Normal file
@@ -0,0 +1,27 @@
|
||||
package services
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
var (
|
||||
ErrAppRepo = errors.New("AppRepo")
|
||||
ErrApplicationNotFound = fmt.Errorf("%w: application not found", ErrAppRepo)
|
||||
)
|
||||
|
||||
type Application struct {
|
||||
ID uuid.UUID
|
||||
Name string
|
||||
State string
|
||||
}
|
||||
|
||||
type AppRepo interface {
|
||||
IsRegistered(name string) bool
|
||||
PendingApprovalCount() int
|
||||
GetApp(name string) (Application, error)
|
||||
StartAppRegistration(name string) uuid.UUID
|
||||
ApproveApp(id uuid.UUID) (Application, error)
|
||||
}
|
||||
Reference in New Issue
Block a user