identity

package
v1.1.68-test Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2026 License: MIT Imports: 4 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentLink string

AgentLink is an org-local link constrained to an "agent" — networkResources[]. agentLink (identity.ts).

func (AgentLink) ValidationRule

func (AgentLink) ValidationRule() *validate.Rule

type AwsIdentity

type AwsIdentity struct {
	CloudAccountLink CloudAccountLink   `json:"cloudAccountLink" validate:"required"`
	PolicyRefs       []PolicyRef        `json:"policyRefs,omitzero"`
	TrustPolicy      *AwsPolicyDocument `json:"trustPolicy,omitzero"`
	RoleName         AwsRoleName        `json:"roleName,omitzero"`
}

func (AwsIdentity) ValidationRule

func (AwsIdentity) ValidationRule() *validate.Rule

ValidationRule reflects AwsIdentity and layers its presence relations (identity.ts:24): exactly one of roleName/policyRefs, at most one of roleName/trustPolicy.

type AwsPolicyDocument

type AwsPolicyDocument struct {
	Version   string                       `json:"Version,omitzero" validate:"default=2012-10-17,optional"`
	Statement []AwsPolicyDocumentStatement `json:"Statement,omitzero"`
}

AwsPolicyDocument keeps the AWS-canonical capitalized keys `Version`/`Statement` (identity.ts:18) rather than the joi-to-go lowercased forms.

type AwsPolicyDocumentStatement

type AwsPolicyDocumentStatement map[string]any

type AwsRoleName

type AwsRoleName string //ts:export

AwsRoleName ports `AwsRoleName` (identity.ts:6).

func (AwsRoleName) ValidationRule

func (AwsRoleName) ValidationRule() *validate.Rule

ValidationRule ports `AwsRoleName` (identity.ts:6).

type AzureIdentity

type AzureIdentity struct {
	CloudAccountLink CloudAccountLink      `json:"cloudAccountLink" validate:"required"`
	RoleAssignments  []AzureRoleAssignment `json:"roleAssignments,omitzero"`
}

type AzureRoleAssignment

type AzureRoleAssignment struct {
	Scope string   `json:"scope,omitzero"`
	Roles []string `json:"roles,omitzero" validate:"min=1"`
}
type CloudAccountLink string

CloudAccountLink is an org-local link constrained to a "cloudaccount" — the aws/azure/gcp/ngs cloudAccountLink (identity.ts). The field keeps its `required` tag.

func (CloudAccountLink) ValidationRule

func (CloudAccountLink) ValidationRule() *validate.Rule

type GcpCondition

type GcpCondition struct {
	Title       string `json:"title"`
	Description string `json:"description,omitzero"`
	Expression  string `json:"expression"`
}

type GcpIdentity

type GcpIdentity struct {
	CloudAccountLink CloudAccountLink      `json:"cloudAccountLink" validate:"required"`
	Scopes           []string              `json:"scopes,omitzero"`
	ServiceAccount   GserviceAccount       `json:"serviceAccount,omitzero" validate:"trim,email"`
	Bindings         []GcpIdentityBindings `json:"bindings,omitzero"`
}

func (GcpIdentity) ValidationRule

func (GcpIdentity) ValidationRule() *validate.Rule

ValidationRule reflects GcpIdentity and layers its presence relation (exactly one of serviceAccount/bindings) plus the scopes content-default (identity.ts:43,46).

type GcpIdentityBindings

type GcpIdentityBindings struct {
	Resource  string        `json:"resource,omitzero"`
	Roles     []GcpRoleName `json:"roles,omitzero" validate:"min=1"`
	Condition *GcpCondition `json:"condition,omitzero"`
}

type GcpRoleName

type GcpRoleName string //ts:export

GcpRoleName ports `GcpRoleName` (identity.ts:15).

func (GcpRoleName) ValidationRule

func (GcpRoleName) ValidationRule() *validate.Rule

ValidationRule ports `GcpRoleName` (identity.ts:15).

type GcpTargetService

type GcpTargetService string

GcpTargetService is a gcp serviceAttachment target (identity.ts:177) — replaces the `pattern=gcpServiceConnect,custom=gcpSvcConnTrim` tags; the leading/trailing slashes are trimmed after the pattern check. The field keeps its `required` tag.

func (GcpTargetService) ValidationRule

func (GcpTargetService) ValidationRule() *validate.Rule

type GserviceAccount

type GserviceAccount string

GserviceAccount is the gcp service-account email (identity.ts:44) — the strongly-typed replacement for the `pattern=gserviceaccount` tag; the field keeps its trim/email tags.

func (GserviceAccount) ValidationRule

func (GserviceAccount) ValidationRule() *validate.Rule

type Identity

type Identity struct {
	Id                     string                  `json:"id,omitzero" validate:"uuid,readOnly"`
	Name                   base.Name               `json:"name,omitzero"`
	Kind                   base.Kind               `json:"kind,omitzero"`
	Version                *float64                `json:"version,omitzero" validate:"positive,integer,readOnly"`
	Description            string                  `json:"description,omitzero" validate:"trim,max=250,allow="`
	Tags                   IdentityTags            `json:"tags,omitzero" validate:"default={}"`
	Created                string                  `json:"created,omitzero" validate:"date,readOnly"`
	LastModified           string                  `json:"lastModified,omitzero" validate:"date,readOnly"`
	Links                  base.Links              `json:"links,omitzero" validate:"readOnly"`
	Aws                    *AwsIdentity            `json:"aws,omitzero"`
	Gcp                    *GcpIdentity            `json:"gcp,omitzero"`
	Azure                  *AzureIdentity          `json:"azure,omitzero"`
	Ngs                    *NgsIdentity            `json:"ngs,omitzero"`
	NetworkResources       []NetworkResource       `json:"networkResources,omitzero" validate:"uniqueBy=name,max=50"`
	NativeNetworkResources []NativeNetworkResource `json:"nativeNetworkResources,omitzero" validate:"uniqueBy=name,max=50"`
	MemcacheAccess         []MemcacheAccess        `json:"memcacheAccess,omitzero" validate:"uniqueBy=clusterLink,max=5"`
	SpicedbAccess          []SpicedbAccess         `json:"spicedbAccess,omitzero" validate:"uniqueBy=clusterLink,max=5"`
	Status                 *Status                 `json:"status,omitzero"`
	Gvc                    string                  `json:"gvc,omitzero" validate:"optional,allow="`
}

func (Identity) ValidationRule

func (Identity) ValidationRule() *validate.Rule

ValidationRule reflects Identity and layers the per-array Name/FQDN uniqueness custom (identity.ts:213).

type IdentityTags

type IdentityTags = base.Tags

IdentityTags aliases base.Tags so the reflection base-type registry resolves it to the shared TagsRule.

type Ipv4Addr

type Ipv4Addr string

Ipv4Addr ports `Joi.string().ip({ version: 'ipv4' })` (optional CIDR).

func (Ipv4Addr) ValidationRule

func (Ipv4Addr) ValidationRule() *validate.Rule

ValidationRule ports `Ipv4Addr = Joi.string().ip({ version: 'ipv4' })` — an IPv4 address with an optional CIDR suffix (Joi's default cidr is 'optional').

type Ipv4AddrList

type Ipv4AddrList []Ipv4Addr

Ipv4AddrList is `Joi.array().items(Ipv4Addr).custom(makeUnique())`; the field keeps its min/max tags.

func (Ipv4AddrList) ValidationRule

func (Ipv4AddrList) ValidationRule() *validate.Rule

type MemcacheAccess

type MemcacheAccess struct {
	ClusterLink MemcacheClusterLink `json:"clusterLink" validate:"required"`
	Role        MemcacheAccessRole  `json:"role,omitzero" validate:"required"`
}

type MemcacheAccessRole

type MemcacheAccessRole string
const (
	MemcacheAccessRoleReadWrite MemcacheAccessRole = "readWrite"
)

func (MemcacheAccessRole) EnumValues

func (MemcacheAccessRole) EnumValues() []string
type MemcacheClusterLink string

MemcacheClusterLink is an org-local link constrained to a "memcachecluster" — memcacheAccess[].clusterLink (identity.ts). The field keeps its `required` tag.

func (MemcacheClusterLink) ValidationRule

func (MemcacheClusterLink) ValidationRule() *validate.Rule

type NativeNetworkResource

type NativeNetworkResource struct {
	Name              NetworkName                             `json:"name" validate:"required"`
	FQDN              string                                  `json:"FQDN,omitzero" validate:"domain,lowercase"`
	Ports             NetworkPortList                         `json:"ports" validate:"min=1,max=10,sort,required"`
	AwsPrivateLink    *NativeNetworkResourceAwsPrivateLink    `json:"awsPrivateLink,omitzero"`
	GcpServiceConnect *NativeNetworkResourceGcpServiceConnect `json:"gcpServiceConnect,omitzero"`
}

func (NativeNetworkResource) ValidationRule

func (NativeNetworkResource) ValidationRule() *validate.Rule

ValidationRule reflects NativeNetworkResource and layers its presence relation: exactly one of awsPrivateLink/gcpServiceConnect (identity.ts:166).

type NativeNetworkResourceAwsPrivateLink struct {
	EndpointServiceName string `json:"endpointServiceName" validate:"required"`
}

type NativeNetworkResourceGcpServiceConnect

type NativeNetworkResourceGcpServiceConnect struct {
	TargetService GcpTargetService `json:"targetService" validate:"required"`
}

type NatsSubject

type NatsSubject string

NatsSubject ports `Joi.string().trim().custom(validSubject)` — a valid NATS subject.

func (NatsSubject) ValidationRule

func (NatsSubject) ValidationRule() *validate.Rule

ValidationRule ports `NatsSubject = Joi.string().trim().custom(validSubject)`.

type NatsSubjectList

type NatsSubjectList []NatsSubject

NatsSubjectList is `Joi.array().items(NatsSubject).custom(makeUnique())`.

func (NatsSubjectList) ValidationRule

func (NatsSubjectList) ValidationRule() *validate.Rule

type NetworkName

type NetworkName string

NetworkName ports `Joi.alternatives(Name, Joi.string().domain())` — a network resource name (a Name OR a domain).

func (NetworkName) ValidationRule

func (NetworkName) ValidationRule() *validate.Rule

ValidationRule ports `NetworkName = Joi.alternatives(Name, Joi.string().domain())`.

type NetworkPort

type NetworkPort float64

NetworkPort ports `Joi.number().integer().min(0).max(65535)`.

func (NetworkPort) ValidationRule

func (NetworkPort) ValidationRule() *validate.Rule

ValidationRule ports `NetworkPort = Joi.number().integer().min(0).max(65535)`.

type NetworkPortList

type NetworkPortList []NetworkPort

NetworkPortList is `Joi.array().items(NetworkPort).custom(makeUnique())`; the field keeps its min/max/sort/required tags.

func (NetworkPortList) ValidationRule

func (NetworkPortList) ValidationRule() *validate.Rule

type NetworkResource

type NetworkResource struct {
	Name       NetworkName     `json:"name" validate:"required"`
	AgentLink  AgentLink       `json:"agentLink,omitzero"`
	IPs        Ipv4AddrList    `json:"IPs,omitzero" validate:"min=1,max=5"`
	FQDN       string          `json:"FQDN,omitzero" validate:"domain,lowercase"`
	ResolverIP Ipv4Addr        `json:"resolverIP,omitzero"`
	Ports      NetworkPortList `json:"ports" validate:"min=1,max=10,sort,required"`
}

func (NetworkResource) ValidationRule

func (NetworkResource) ValidationRule() *validate.Rule

ValidationRule reflects NetworkResource and layers its presence relation: exactly one of FQDN/IPs (identity.ts, NetworkResource).

type NgsIdentity

type NgsIdentity struct {
	CloudAccountLink CloudAccountLink `json:"cloudAccountLink" validate:"required"`
	Pub              *NgsIdentityPub  `json:"pub,omitzero"`
	Sub              *NgsIdentitySub  `json:"sub,omitzero"`
	Resp             *NgsIdentityResp `json:"resp,omitzero"`
	Subs             *float64         `json:"subs,omitzero" validate:"integer,min=-1,default=-1"`
	Data             *float64         `json:"data,omitzero" validate:"integer,min=-1,default=-1"`
	Payload          *float64         `json:"payload,omitzero" validate:"integer,min=-1,default=-1"`
}

type NgsIdentityPub

type NgsIdentityPub struct {
	Allow NatsSubjectList `json:"allow,omitzero"`
	Deny  NatsSubjectList `json:"deny,omitzero"`
}

type NgsIdentityResp

type NgsIdentityResp struct {
	Max *float64 `json:"max,omitzero" validate:"integer,min=-1,default=1"`
	Ttl NgsTtl   `json:"ttl,omitzero"`
}

type NgsIdentitySub

type NgsIdentitySub struct {
	Allow NatsSubjectList `json:"allow,omitzero"`
	Deny  NatsSubjectList `json:"deny,omitzero"`
}

type NgsTtl

type NgsTtl string

NgsTtl is the ngs response TTL (identity.ts:106) — replaces the `pattern=ngsTtl` tag.

func (NgsTtl) ValidationRule

func (NgsTtl) ValidationRule() *validate.Rule

type PolicyRef

type PolicyRef string //ts:export

PolicyRef ports `PolicyRef` (identity.ts:11).

func (PolicyRef) ValidationRule

func (PolicyRef) ValidationRule() *validate.Rule

ValidationRule ports `PolicyRef` (identity.ts:11).

type SpicedbAccess

type SpicedbAccess struct {
	ClusterLink SpicedbClusterLink `json:"clusterLink" validate:"required"`
	Role        SpicedbAccessRole  `json:"role,omitzero" validate:"required"`
}

type SpicedbAccessRole

type SpicedbAccessRole string
const (
	SpicedbAccessRoleCheckPermission SpicedbAccessRole = "checkPermission"
	SpicedbAccessRoleRead            SpicedbAccessRole = "read"
	SpicedbAccessRoleWrite           SpicedbAccessRole = "write"
)

func (SpicedbAccessRole) EnumValues

func (SpicedbAccessRole) EnumValues() []string
type SpicedbClusterLink string

SpicedbClusterLink is an org-local link constrained to a "spicedbcluster" — spicedbAccess[].clusterLink (identity.ts). The field keeps its `required` tag.

func (SpicedbClusterLink) ValidationRule

func (SpicedbClusterLink) ValidationRule() *validate.Rule

type Status

type Status struct {
	ObjectName string       `json:"objectName,omitzero"`
	Aws        *StatusAws   `json:"aws,omitzero"`
	Gcp        *StatusGcp   `json:"gcp,omitzero"`
	Azure      *StatusAzure `json:"azure,omitzero"`
}

type StatusAws

type StatusAws struct {
	LastError string `json:"lastError,omitzero"`
	Usable    *bool  `json:"usable,omitzero"`
}

type StatusAzure

type StatusAzure struct {
	LastError string `json:"lastError,omitzero"`
	Usable    *bool  `json:"usable,omitzero"`
}

type StatusGcp

type StatusGcp struct {
	LastError string `json:"lastError,omitzero"`
	Usable    *bool  `json:"usable,omitzero"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL