github.com/containerd/nerdctl@v1.7.7/pkg/buildkitutil/types.go (about)

     1  /*
     2     Copyright The containerd Authors.
     3  
     4     Licensed under the Apache License, Version 2.0 (the "License");
     5     you may not use this file except in compliance with the License.
     6     You may obtain a copy of the License at
     7  
     8         http://www.apache.org/licenses/LICENSE-2.0
     9  
    10     Unless required by applicable law or agreed to in writing, software
    11     distributed under the License is distributed on an "AS IS" BASIS,
    12     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13     See the License for the specific language governing permissions and
    14     limitations under the License.
    15  */
    16  
    17  /*
    18     Portions from https://github.com/moby/buildkit/blob/v0.11.0/client/diskusage.go
    19     Copyright (C) The BuildKit authors.
    20     Licensed under the Apache License, Version 2.0
    21  */
    22  
    23  package buildkitutil
    24  
    25  import "time"
    26  
    27  // UsageInfo is from https://github.com/moby/buildkit/blob/v0.11.0/client/diskusage.go#L12-L25
    28  type UsageInfo struct {
    29  	ID      string `json:"id"`
    30  	Mutable bool   `json:"mutable"`
    31  	InUse   bool   `json:"inUse"`
    32  	Size    int64  `json:"size"`
    33  
    34  	CreatedAt   time.Time       `json:"createdAt"`
    35  	LastUsedAt  *time.Time      `json:"lastUsedAt"`
    36  	UsageCount  int             `json:"usageCount"`
    37  	Parents     []string        `json:"parents"`
    38  	Description string          `json:"description"`
    39  	RecordType  UsageRecordType `json:"recordType"`
    40  	Shared      bool            `json:"shared"`
    41  }
    42  
    43  // UsageRecordType is from https://github.com/moby/buildkit/blob/v0.11.0/client/diskusage.go#L75
    44  type UsageRecordType string