Documentation ¶
Index ¶
- type Option
- type Server
- func (s *Server) CreateRecord(ctx context.Context, req *pb.CreateRecordRequest) (*pb.Record, error)
- func (s *Server) CreateResult(ctx context.Context, req *pb.CreateResultRequest) (*pb.Result, error)
- func (s *Server) DeleteLog(ctx context.Context, req *pb.DeleteLogRequest) (*empty.Empty, error)
- func (s *Server) DeleteRecord(ctx context.Context, req *pb.DeleteRecordRequest) (*empty.Empty, error)
- func (s *Server) DeleteResult(ctx context.Context, req *pb.DeleteResultRequest) (*empty.Empty, error)
- func (s *Server) GetLog(req *pb.GetLogRequest, srv pb.Logs_GetLogServer) error
- func (s *Server) GetRecord(ctx context.Context, req *pb.GetRecordRequest) (*pb.Record, error)
- func (s *Server) GetRecordListSummary(ctx context.Context, req *pb.RecordListSummaryRequest) (*pb.RecordListSummary, error)
- func (s *Server) GetResult(ctx context.Context, req *pb.GetResultRequest) (*pb.Result, error)
- func (s *Server) ListLogs(ctx context.Context, req *pb.ListRecordsRequest) (*pb.ListRecordsResponse, error)
- func (s *Server) ListRecords(ctx context.Context, req *pb.ListRecordsRequest) (*pb.ListRecordsResponse, error)
- func (s *Server) ListResults(ctx context.Context, req *pb.ListResultsRequest) (*pb.ListResultsResponse, error)
- func (s *Server) UpdateLog(srv pb.Logs_UpdateLogServer) error
- func (s *Server) UpdateRecord(ctx context.Context, req *pb.UpdateRecordRequest) (*pb.Record, error)
- func (s *Server) UpdateResult(ctx context.Context, req *pb.UpdateResultRequest) (*pb.Result, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct { pb.UnimplementedResultsServer pb.UnimplementedLogsServer // contains filtered or unexported fields }
Server with implementation of API server
func New ¶
func New(config *config.Config, logger *zap.SugaredLogger, db *gorm.DB, opts ...Option) (*Server, error)
New set up environment for the api server
func (*Server) CreateRecord ¶
CreateRecord creates a new record in the database.
func (*Server) CreateResult ¶
CreateResult creates a new result in the database.
func (*Server) DeleteRecord ¶
func (s *Server) DeleteRecord(ctx context.Context, req *pb.DeleteRecordRequest) (*empty.Empty, error)
DeleteRecord deletes a given record.
func (*Server) DeleteResult ¶
func (s *Server) DeleteResult(ctx context.Context, req *pb.DeleteResultRequest) (*empty.Empty, error)
DeleteResult deletes a given result.
func (*Server) GetLog ¶ added in v0.5.0
func (s *Server) GetLog(req *pb.GetLogRequest, srv pb.Logs_GetLogServer) error
GetLog streams log record by log request
func (*Server) GetRecordListSummary ¶ added in v0.9.0
func (s *Server) GetRecordListSummary(ctx context.Context, req *pb.RecordListSummaryRequest) (*pb.RecordListSummary, error)
GetRecordListSummary returns the summary and aggregation for a given list of records
func (*Server) ListLogs ¶ added in v0.5.0
func (s *Server) ListLogs(ctx context.Context, req *pb.ListRecordsRequest) (*pb.ListRecordsResponse, error)
ListLogs returns list log records
func (*Server) ListRecords ¶
func (s *Server) ListRecords(ctx context.Context, req *pb.ListRecordsRequest) (*pb.ListRecordsResponse, error)
ListRecords returns list records from the database.
func (*Server) ListResults ¶
func (s *Server) ListResults(ctx context.Context, req *pb.ListResultsRequest) (*pb.ListResultsResponse, error)
ListResults returns list results from the database.
func (*Server) UpdateLog ¶ added in v0.5.0
func (s *Server) UpdateLog(srv pb.Logs_UpdateLogServer) error
UpdateLog updates log record content
func (*Server) UpdateRecord ¶
UpdateRecord updates a record in the database.
func (*Server) UpdateResult ¶
UpdateResult updates a Result in the database.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package record provides utilities for manipulating and validating Records.
|
Package record provides utilities for manipulating and validating Records. |
Package result provides utilities for manipulating and validating Results.
|
Package result provides utilities for manipulating and validating Results. |