chore: move infinity retention definition
This commit is contained in:
1 parent
b237fe24f1
commit
621b535dde
2 files changed
+5
-5
No files matched your search
@@ -12,7 +12,7 @@ import (
|
||||
"github.com/hashicorp/boundary/api/scopes"
|
||||
"github.com/hashicorp/boundary/api/sessionrecordings"
|
||||
"github.com/hashicorp/boundary/internal/cmd/base"
|
||||
"github.com/hashicorp/boundary/internal/policy/storage"
|
||||
"github.com/hashicorp/boundary/internal/recording"
|
||||
)
|
||||
|
||||
type extraCmdVars struct{}
|
||||
@@ -119,7 +119,7 @@ func (c *Command) printListTable(items []*sessionrecordings.SessionRecording) st
|
||||
if !item.RetainUntil.IsZero() {
|
||||
var retention string
|
||||
switch item.RetainUntil {
|
||||
case storage.InfinityTS:
|
||||
case recording.InfinityTS:
|
||||
retention = "Keep Forever"
|
||||
default:
|
||||
retention = item.RetainUntil.Local().Format(time.RFC1123)
|
||||
@@ -185,7 +185,7 @@ func printItemTable(item *sessionrecordings.SessionRecording, resp *api.Response
|
||||
if !item.RetainUntil.IsZero() {
|
||||
var retention string
|
||||
switch item.RetainUntil {
|
||||
case storage.InfinityTS:
|
||||
case recording.InfinityTS:
|
||||
retention = "Keep Forever"
|
||||
default:
|
||||
retention = item.RetainUntil.Local().Format(time.RFC1123)
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
// Copyright (c) HashiCorp, Inc.
|
||||
// SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
package storage
|
||||
package recording
|
||||
|
||||
import "time"
|
||||
|
||||
// InfinityTS is the max protobuf timestamp value of 9999-12-31T23:59:59.999999999Z. It is
|
||||
// used to represent a infinite retention value in storage policies.
|
||||
// used to represent a infinite retention value in session recording.
|
||||
var InfinityTS = time.Date(9999, time.December, 31, 23, 23, 23, 1e9-1, time.UTC)
|
||||
Reference in new issue
Block a user