Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GetInput ¶
type GetInput struct { // ID of the entity ID int64 // Name of the entity Name string // ProjectID of the entity belongs to ProjectID int64 }
GetInput is common type used for querying specific entity in its storage
type ListInput ¶
type ListInput struct { // Project ID ProjectID int64 // Starting offset of the list request Offset int // Limit number of entities returned Limit int }
ListInput is common type used for querying list of entities in its storage
func ListInputFromOption ¶
func ListInputFromOption(projectID int64, detail *timberv1.ListOption) ListInput
ListInputFromOption creates list input from list request options
type LogWriter ¶
type LogWriter interface { // Get a log writer given its identifier Get(ctx context.Context, input GetInput) (*model.LogWriter, error) // Create a new log writer and return the stored log writer with ID populated or error Create(ctx context.Context, lw *model.LogWriter) (*model.LogWriter, error) // Update an existing log writer and return the stored log writer or error Update(ctx context.Context, lw *model.LogWriter) (*model.LogWriter, error) // List all log writer given the list input List(ctx context.Context, listInput ListInput) ([]*model.LogWriter, error) }
LogWriter interface providing access for LogWriter storage
func NewLogWriter ¶
NewLogWriter creates new Log Writer storage
type ObservationService ¶
type ObservationService interface { // Get an observation service given its identifier Get(ctx context.Context, input GetInput) (*model.ObservationService, error) // Create a new observation service and return the stored observation service with ID populated or error Create(ctx context.Context, lw *model.ObservationService) (*model.ObservationService, error) // Update an existing observation service and return the stored observation service or error Update(ctx context.Context, lw *model.ObservationService) (*model.ObservationService, error) // List all observation service given the list input List(ctx context.Context, listInput ListInput) ([]*model.ObservationService, error) }
ObservationService interface providing access for ObservationService storage
func NewObservationService ¶
func NewObservationService(db *gorm.DB) ObservationService
NewObservationService creates new observation service storage
Source Files ¶
Click to show internal directories.
Click to hide internal directories.