Implement platform management features
This commit is contained in:
@@ -22,6 +22,8 @@ type LogBatchIngestRequest struct {
|
||||
ServerInstanceID string `json:"serverInstanceId"`
|
||||
StreamKey string `json:"streamKey"`
|
||||
Source domain.LogStreamSource `json:"source"`
|
||||
LogSessionID string `json:"logSessionId,omitempty"`
|
||||
SessionStartedAt time.Time `json:"sessionStartedAt,omitempty"`
|
||||
FirstSeq uint64 `json:"firstSeq"`
|
||||
LastSeq uint64 `json:"lastSeq"`
|
||||
Compression string `json:"compression"`
|
||||
@@ -74,6 +76,8 @@ type LogStreamEventResponse struct {
|
||||
StreamID string `json:"streamId"`
|
||||
Source domain.LogStreamSource `json:"source"`
|
||||
StreamKey string `json:"streamKey"`
|
||||
LogSessionID string `json:"logSessionId,omitempty"`
|
||||
SessionStartedAt time.Time `json:"sessionStartedAt,omitempty"`
|
||||
LatestSeq uint64 `json:"latestSeq"`
|
||||
Entry LogEntryBody `json:"entry"`
|
||||
}
|
||||
@@ -84,6 +88,14 @@ type LogStreamEventsReadyResponse struct {
|
||||
ServerTime time.Time `json:"serverTime"`
|
||||
}
|
||||
|
||||
type LogStreamEventsSessionResponse struct {
|
||||
ServerInstanceID string `json:"serverInstanceId"`
|
||||
LogSessionID string `json:"logSessionId,omitempty"`
|
||||
SessionStartedAt time.Time `json:"sessionStartedAt,omitempty"`
|
||||
StreamCount int `json:"streamCount"`
|
||||
ServerTime time.Time `json:"serverTime"`
|
||||
}
|
||||
|
||||
func (request LogBatchIngestRequest) ToDomain() domain.LogBatchIngest {
|
||||
return domain.LogBatchIngest{
|
||||
RunEndpointID: request.RunEndpointID,
|
||||
@@ -92,6 +104,8 @@ func (request LogBatchIngestRequest) ToDomain() domain.LogBatchIngest {
|
||||
ServerInstanceID: request.ServerInstanceID,
|
||||
StreamKey: request.StreamKey,
|
||||
Source: request.Source,
|
||||
LogSessionID: request.LogSessionID,
|
||||
SessionStartedAt: request.SessionStartedAt,
|
||||
FirstSeq: request.FirstSeq,
|
||||
LastSeq: request.LastSeq,
|
||||
Compression: request.Compression,
|
||||
@@ -145,6 +159,8 @@ func LogStreamEventFromDomain(event domain.LogStreamEvent) LogStreamEventRespons
|
||||
StreamID: event.Stream.ID,
|
||||
Source: event.Stream.Source,
|
||||
StreamKey: event.Stream.StreamKey,
|
||||
LogSessionID: event.Stream.LogSessionID,
|
||||
SessionStartedAt: event.Stream.SessionStartedAt,
|
||||
LatestSeq: event.LatestSeq,
|
||||
Entry: logEntryFromDomain(event.Entry),
|
||||
}
|
||||
|
||||
@@ -893,6 +893,8 @@ type LogStreamCreateRequest struct {
|
||||
ServerInstanceID string `json:"serverInstanceId"`
|
||||
Source domain.LogStreamSource `json:"source"`
|
||||
StreamKey string `json:"streamKey"`
|
||||
LogSessionID string `json:"logSessionId,omitempty"`
|
||||
SessionStartedAt time.Time `json:"sessionStartedAt,omitempty"`
|
||||
StorageBackend domain.LogStorageBackend `json:"storageBackend"`
|
||||
RetentionPolicy string `json:"retentionPolicy"`
|
||||
}
|
||||
@@ -902,6 +904,8 @@ type LogStreamResponse struct {
|
||||
ServerInstanceID string `json:"serverInstanceId"`
|
||||
Source domain.LogStreamSource `json:"source"`
|
||||
StreamKey string `json:"streamKey"`
|
||||
LogSessionID string `json:"logSessionId,omitempty"`
|
||||
SessionStartedAt time.Time `json:"sessionStartedAt,omitempty"`
|
||||
LatestSeq uint64 `json:"latestSeq"`
|
||||
StorageBackend domain.LogStorageBackend `json:"storageBackend"`
|
||||
RetentionPolicy string `json:"retentionPolicy"`
|
||||
@@ -1363,6 +1367,8 @@ func (request LogStreamCreateRequest) ToDomain() domain.LogStream {
|
||||
ServerInstanceID: request.ServerInstanceID,
|
||||
Source: request.Source,
|
||||
StreamKey: request.StreamKey,
|
||||
LogSessionID: request.LogSessionID,
|
||||
SessionStartedAt: request.SessionStartedAt,
|
||||
StorageBackend: request.StorageBackend,
|
||||
RetentionPolicy: request.RetentionPolicy,
|
||||
}
|
||||
@@ -1938,6 +1944,8 @@ func LogStreamFromDomain(stream domain.LogStream) LogStreamResponse {
|
||||
ServerInstanceID: stream.ServerInstanceID,
|
||||
Source: stream.Source,
|
||||
StreamKey: stream.StreamKey,
|
||||
LogSessionID: stream.LogSessionID,
|
||||
SessionStartedAt: stream.SessionStartedAt,
|
||||
LatestSeq: stream.LatestSeq,
|
||||
StorageBackend: stream.StorageBackend,
|
||||
RetentionPolicy: stream.RetentionPolicy,
|
||||
|
||||
Reference in New Issue
Block a user