Documentation ¶
Index ¶
- Constants
- func GetAuthTokenFromHeader(r *http.Request) (string, error)
- func SendAuthorizationErrorJSON(w http.ResponseWriter, r *http.Request, err error)
- func SendErrorJSON(w http.ResponseWriter, r *http.Request, httpStatusCode int, err error, ...)
- func SendValidationErrorJSON(w http.ResponseWriter, r *http.Request, err error)
- type AdminProjectStore
- type Authenticator
- type BaseTagStore
- type DayStore
- type EventService
- type Form
- type FormValidator
- type ManagerTagStore
- type ProjectStore
- type RealmAccess
- type RestServer
- type SettingsStore
- type TagStore
- type UserInfo
Constants ¶
View Source
const ( ErrInternal = 0 ErrValidation = 1 ErrAuthorization = 2 )
Variables ¶
This section is empty.
Functions ¶
func SendAuthorizationErrorJSON ¶
func SendAuthorizationErrorJSON(w http.ResponseWriter, r *http.Request, err error)
func SendErrorJSON ¶
func SendValidationErrorJSON ¶
func SendValidationErrorJSON(w http.ResponseWriter, r *http.Request, err error)
Types ¶
type AdminProjectStore ¶
type AdminProjectStore interface { Create(record repository.Project) (*mongo.InsertOneResult, error) Search(form repository.ProjectSearchForm) ([]repository.Project, error) Update(record repository.Project) (string, error) Delete(projectID string) error }
type Authenticator ¶
type Authenticator struct {
// contains filtered or unexported fields
}
func (*Authenticator) HttpMiddleware ¶
func (a *Authenticator) HttpMiddleware(next http.Handler) http.Handler
type BaseTagStore ¶
type BaseTagStore interface { Create(tag repository.Tag) (*mongo.InsertOneResult, error) UpdateBaseTag(tag repository.Tag) (string, error) DeleteBaseTag(tagID string) error }
type EventService ¶
type FormValidator ¶
type FormValidator struct {
// contains filtered or unexported fields
}
func CreateValidator ¶
func CreateValidator() *FormValidator
type ManagerTagStore ¶
type ManagerTagStore interface { Create(tag repository.Tag) (*mongo.InsertOneResult, error) Update(tag repository.Tag) (string, error) DeleteByProjectID(tagID string, projectIDs []string) error Delete(tagID string) error }
type ProjectStore ¶
type ProjectStore interface {
FindAllActiveProjectsByUser(userID string) (repository.Projects, error)
}
type RealmAccess ¶
type RealmAccess struct {
Roles []string `json:"roles"`
}
type RestServer ¶
type RestServer struct {
// contains filtered or unexported fields
}
func CreateRestServer ¶
func CreateRestServer(database *mongo.Database, keycloakUrl string) (*RestServer, error)
func (*RestServer) Run ¶
func (s *RestServer) Run() error
func (*RestServer) Shutdown ¶
func (s *RestServer) Shutdown()
type SettingsStore ¶
type SettingsStore interface { FindByUser(userID string) (*repository.Settings, error) CreateOrUpdate(settings repository.Settings) error }
type TagStore ¶
type TagStore interface { FindAllBaseAndProjectActiveTags(projectID []string) ([]repository.Tag, error) FindAllActive() ([]repository.Tag, error) }
Click to show internal directories.
Click to hide internal directories.