Files
threshold/internal/boundary/boundary.go
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

43 lines
1.2 KiB
Go
Raw Normal View History

2022-04-29 09:52:01 -04:00
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1
2023-02-02 17:15:17 -08:00
// Package boundary contains global interfaces and other definitions that
// define the Boundary domain.
package boundary
2022-04-29 09:52:01 -04:00
import (
"github.com/hashicorp/boundary/internal/db/timestamp"
"github.com/hashicorp/boundary/internal/types/resource"
2022-04-29 09:52:01 -04:00
)
// An Entity is an object distinguished by its identity, rather than its
// attributes. It can contain value objects and other entities.
type Entity interface {
GetPublicId() string
}
// An Aggregate is an entity that is the root of a transactional
// consistency boundary.
type Aggregate interface {
Entity
GetVersion() uint32
GetCreateTime() *timestamp.Timestamp
GetUpdateTime() *timestamp.Timestamp
}
// A Resource is an aggregate with a name, description, and resource type.
type Resource interface {
Aggregate
GetName() string
GetDescription() string
GetResourceType() resource.Type
}
2022-04-29 09:52:01 -04:00
// AuthzProtectedEntity is used by some functions (primarily
// scopeids.AuthzProtectedEntityProvider-conforming implementations) to deliver
// some common information necessary for calculating authz.
type AuthzProtectedEntity interface {
Entity
2022-07-20 16:24:46 -07:00
GetProjectId() string
2022-04-29 09:52:01 -04:00
GetUserId() string
}