Documentation ¶
Index ¶
- Constants
- type SearchCursor
- type SearchOptions
- type Service
- type Store
- func (s *Store) CreateServiceTx(ctx context.Context, tx *sql.Tx, svc *Service) (*Service, error)
- func (s *Store) DeleteManyTx(ctx context.Context, tx *sql.Tx, ids []string) error
- func (s *Store) FindAllByEP(ctx context.Context, epID string) ([]Service, error)
- func (s *Store) FindMany(ctx context.Context, ids []string) ([]Service, error)
- func (s *Store) FindOne(ctx context.Context, id string) (*Service, error)
- func (s *Store) FindOneForUpdate(ctx context.Context, tx *sql.Tx, id string) (*Service, error)
- func (s *Store) FindOneForUser(ctx context.Context, userID, serviceID string) (*Service, error)
- func (s *Store) Search(ctx context.Context, opts *SearchOptions) ([]Service, error)
- func (s *Store) UpdateTx(ctx context.Context, tx *sql.Tx, svc *Service) error
Constants ¶
View Source
const MaxDetailsLength = 6 * 1024 // 6KiB
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SearchCursor ¶
type SearchOptions ¶
type SearchOptions struct { // Search is matched case-insensitive against the service name and description. Search string `json:"s,omitempty"` // FavoritesUserID specifies the UserID whose favorite services want to be displayed. FavoritesUserID string `json:"u,omitempty"` // FavoritesOnly controls filtering the results to those marked as favorites by FavoritesUserID. FavoritesOnly bool `json:"o,omitempty"` // Omit specifies a list of service IDs to exclude from the results. Omit []string `json:"m,omitempty"` // FavoritesFirst indicates that services marked as favorite (by FavoritesUserID) should be returned first (before any non-favorites). FavoritesFirst bool `json:"f,omitempty"` // Limit will limit the number of results. Limit int `json:"-"` After SearchCursor `json:"a,omitempty"` }
SearchOptions contains criteria for filtering and sorting services.
type Service ¶
type Service struct { ID string Name string Description string EscalationPolicyID string MaintenanceExpiresAt time.Time // contains filtered or unexported fields }
func (Service) EscalationPolicyName ¶
func (Service) IsUserFavorite ¶
IsUserFavorite returns a boolean value based on if the service is a favorite of the user or not.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) CreateServiceTx ¶
func (*Store) DeleteManyTx ¶
func (*Store) FindAllByEP ¶
func (*Store) FindOneForUpdate ¶
func (*Store) FindOneForUser ¶
Click to show internal directories.
Click to hide internal directories.