The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
grafana/pkg/models/account.go

50 lines
771 B

package models
import (
"errors"
"time"
)
// Typed errors
var (
ErrAccountNotFound = errors.New("Account not found")
)
11 years ago
type Account struct {
Id int64
Name string
Created time.Time
Updated time.Time
}
// ---------------------
// COMMANDS
type CreateAccountCommand struct {
Name string `json:"name"`
Result Account `json:"-"`
}
type UpdateAccountCommand struct {
Name string `json:"name"`
AccountId int64 `json:"-"`
}
type GetUserAccountsQuery struct {
UserId int64
Result []*UserAccountDTO
}
type GetAccountByIdQuery struct {
Id int64
Result *Account
}
type UserAccountDTO struct {
AccountId int64 `json:"accountId"`
Name string `json:"email"`
Role RoleType `json:"role"`
IsUsing bool `json:"isUsing"`
}