relationships

package
v1.19.2 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Kind_name = map[int32]string{
		0: "KIND_UNSPECIFIED",
		1: "KIND_ASSIGNMENT",
	}
	Kind_value = map[string]int32{
		"KIND_UNSPECIFIED": 0,
		"KIND_ASSIGNMENT":  1,
	}
)

Enum value maps for Kind.

View Source
var (
	Origin_name = map[int32]string{
		0: "ORIGIN_UNSPECIFIED",
		1: "ORIGIN_SELF",
		2: "ORIGIN_GITLAB_FEDERATED",
	}
	Origin_value = map[string]int32{
		"ORIGIN_UNSPECIFIED":      0,
		"ORIGIN_SELF":             1,
		"ORIGIN_GITLAB_FEDERATED": 2,
	}
)

Enum value maps for Origin.

View Source
var File_proto_relationships_relationships_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Identity

type Identity struct {
	Origin   Origin `protobuf:"varint,1,opt,name=origin,proto3,enum=gitlab.iam.relationships.v1.Origin" json:"origin,omitempty"`
	OriginId string `protobuf:"bytes,2,opt,name=origin_id,json=originId,proto3" json:"origin_id,omitempty"`
	LocalId  string `protobuf:"bytes,3,opt,name=local_id,json=localId,proto3" json:"local_id,omitempty"`
	// contains filtered or unexported fields
}

Identity carries an external identity. The server resolves it to a Principal. local_id is the integer user_id encoded as a decimal string.

func (*Identity) Descriptor deprecated

func (*Identity) Descriptor() ([]byte, []int)

Deprecated: Use Identity.ProtoReflect.Descriptor instead.

func (*Identity) GetLocalId

func (x *Identity) GetLocalId() string

func (*Identity) GetOrigin

func (x *Identity) GetOrigin() Origin

func (*Identity) GetOriginId

func (x *Identity) GetOriginId() string

func (*Identity) ProtoMessage

func (*Identity) ProtoMessage()

func (*Identity) ProtoReflect

func (x *Identity) ProtoReflect() protoreflect.Message

func (*Identity) Reset

func (x *Identity) Reset()

func (*Identity) String

func (x *Identity) String() string

type Kind

type Kind int32
const (
	Kind_KIND_UNSPECIFIED Kind = 0
	Kind_KIND_ASSIGNMENT  Kind = 1
)

func (Kind) Descriptor

func (Kind) Descriptor() protoreflect.EnumDescriptor

func (Kind) Enum

func (x Kind) Enum() *Kind

func (Kind) EnumDescriptor deprecated

func (Kind) EnumDescriptor() ([]byte, []int)

Deprecated: Use Kind.Descriptor instead.

func (Kind) Number

func (x Kind) Number() protoreflect.EnumNumber

func (Kind) String

func (x Kind) String() string

func (Kind) Type

func (Kind) Type() protoreflect.EnumType

type Object

type Object struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*Object) Descriptor deprecated

func (*Object) Descriptor() ([]byte, []int)

Deprecated: Use Object.ProtoReflect.Descriptor instead.

func (*Object) GetId

func (x *Object) GetId() string

func (*Object) ProtoMessage

func (*Object) ProtoMessage()

func (*Object) ProtoReflect

func (x *Object) ProtoReflect() protoreflect.Message

func (*Object) Reset

func (x *Object) Reset()

func (*Object) String

func (x *Object) String() string

type Origin

type Origin int32
const (
	Origin_ORIGIN_UNSPECIFIED      Origin = 0
	Origin_ORIGIN_SELF             Origin = 1 // local GATE (gitlab.com or SM); origin_id is the organisation_id
	Origin_ORIGIN_GITLAB_FEDERATED Origin = 2 // via Cloud Connector; origin_id is the gitlab_instance_uid
)

func (Origin) Descriptor

func (Origin) Descriptor() protoreflect.EnumDescriptor

func (Origin) Enum

func (x Origin) Enum() *Origin

func (Origin) EnumDescriptor deprecated

func (Origin) EnumDescriptor() ([]byte, []int)

Deprecated: Use Origin.Descriptor instead.

func (Origin) Number

func (x Origin) Number() protoreflect.EnumNumber

func (Origin) String

func (x Origin) String() string

func (Origin) Type

func (Origin) Type() protoreflect.EnumType

type Principal

type Principal struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*Principal) Descriptor deprecated

func (*Principal) Descriptor() ([]byte, []int)

Deprecated: Use Principal.ProtoReflect.Descriptor instead.

func (*Principal) GetId

func (x *Principal) GetId() string

func (*Principal) ProtoMessage

func (*Principal) ProtoMessage()

func (*Principal) ProtoReflect

func (x *Principal) ProtoReflect() protoreflect.Message

func (*Principal) Reset

func (x *Principal) Reset()

func (*Principal) String

func (x *Principal) String() string

type Relationship

type Relationship struct {
	Subject   *Subject               `protobuf:"bytes,1,opt,name=subject,proto3" json:"subject,omitempty"` // identity echoed from input; principal resolved by server on Read
	Object    *Object                `protobuf:"bytes,2,opt,name=object,proto3" json:"object,omitempty"`
	Kind      Kind                   `protobuf:"varint,3,opt,name=kind,proto3,enum=gitlab.iam.relationships.v1.Kind" json:"kind,omitempty"` // never _UNSPECIFIED
	Role      *Role                  `protobuf:"bytes,4,opt,name=role,proto3" json:"role,omitempty"`
	Timestamp *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // server-assigned
	// contains filtered or unexported fields
}

Relationship is the response shape (not validated on input).

func (*Relationship) Descriptor deprecated

func (*Relationship) Descriptor() ([]byte, []int)

Deprecated: Use Relationship.ProtoReflect.Descriptor instead.

func (*Relationship) GetKind

func (x *Relationship) GetKind() Kind

func (*Relationship) GetObject

func (x *Relationship) GetObject() *Object

func (*Relationship) GetRole

func (x *Relationship) GetRole() *Role

func (*Relationship) GetSubject

func (x *Relationship) GetSubject() *Subject

func (*Relationship) GetTimestamp

func (x *Relationship) GetTimestamp() *timestamppb.Timestamp

func (*Relationship) ProtoMessage

func (*Relationship) ProtoMessage()

func (*Relationship) ProtoReflect

func (x *Relationship) ProtoReflect() protoreflect.Message

func (*Relationship) Reset

func (x *Relationship) Reset()

func (*Relationship) String

func (x *Relationship) String() string

type RelationshipInput

type RelationshipInput struct {
	Subject *Subject `protobuf:"bytes,1,opt,name=subject,proto3" json:"subject,omitempty"`
	Object  *Object  `protobuf:"bytes,2,opt,name=object,proto3" json:"object,omitempty"`
	Kind    Kind     `protobuf:"varint,3,opt,name=kind,proto3,enum=gitlab.iam.relationships.v1.Kind" json:"kind,omitempty"`
	Role    *Role    `protobuf:"bytes,4,opt,name=role,proto3" json:"role,omitempty"`
	// contains filtered or unexported fields
}

RelationshipInput is the write-input shape. The server resolves subject and assigns the timestamp.

func (*RelationshipInput) Descriptor deprecated

func (*RelationshipInput) Descriptor() ([]byte, []int)

Deprecated: Use RelationshipInput.ProtoReflect.Descriptor instead.

func (*RelationshipInput) GetKind

func (x *RelationshipInput) GetKind() Kind

func (*RelationshipInput) GetObject

func (x *RelationshipInput) GetObject() *Object

func (*RelationshipInput) GetRole

func (x *RelationshipInput) GetRole() *Role

func (*RelationshipInput) GetSubject

func (x *RelationshipInput) GetSubject() *Subject

func (*RelationshipInput) ProtoMessage

func (*RelationshipInput) ProtoMessage()

func (*RelationshipInput) ProtoReflect

func (x *RelationshipInput) ProtoReflect() protoreflect.Message

func (*RelationshipInput) Reset

func (x *RelationshipInput) Reset()

func (*RelationshipInput) String

func (x *RelationshipInput) String() string

type RelationshipKey

type RelationshipKey struct {
	Subject *Subject `protobuf:"bytes,1,opt,name=subject,proto3" json:"subject,omitempty"`
	Object  *Object  `protobuf:"bytes,2,opt,name=object,proto3" json:"object,omitempty"`
	Kind    Kind     `protobuf:"varint,3,opt,name=kind,proto3,enum=gitlab.iam.relationships.v1.Kind" json:"kind,omitempty"`
	// contains filtered or unexported fields
}

RelationshipKey identifies a single tuple for key-based deletes.

func (*RelationshipKey) Descriptor deprecated

func (*RelationshipKey) Descriptor() ([]byte, []int)

Deprecated: Use RelationshipKey.ProtoReflect.Descriptor instead.

func (*RelationshipKey) GetKind

func (x *RelationshipKey) GetKind() Kind

func (*RelationshipKey) GetObject

func (x *RelationshipKey) GetObject() *Object

func (*RelationshipKey) GetSubject

func (x *RelationshipKey) GetSubject() *Subject

func (*RelationshipKey) ProtoMessage

func (*RelationshipKey) ProtoMessage()

func (*RelationshipKey) ProtoReflect

func (x *RelationshipKey) ProtoReflect() protoreflect.Message

func (*RelationshipKey) Reset

func (x *RelationshipKey) Reset()

func (*RelationshipKey) String

func (x *RelationshipKey) String() string

type Role

type Role struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

Role values are owned by the shared role-permissions library.

func (*Role) Descriptor deprecated

func (*Role) Descriptor() ([]byte, []int)

Deprecated: Use Role.ProtoReflect.Descriptor instead.

func (*Role) GetId

func (x *Role) GetId() string

func (*Role) ProtoMessage

func (*Role) ProtoMessage()

func (*Role) ProtoReflect

func (x *Role) ProtoReflect() protoreflect.Message

func (*Role) Reset

func (x *Role) Reset()

func (*Role) String

func (x *Role) String() string

type Subject

type Subject struct {

	// Types that are valid to be assigned to Id:
	//
	//	*Subject_Identity
	//	*Subject_Principal
	Id isSubject_Id `protobuf_oneof:"id"`
	// contains filtered or unexported fields
}

Subject is the polymorphic identity type used on all RPCs. identity is used on input and in Lookup/Write responses. principal is used in ReadRelationshipsResponse.

func (*Subject) Descriptor deprecated

func (*Subject) Descriptor() ([]byte, []int)

Deprecated: Use Subject.ProtoReflect.Descriptor instead.

func (*Subject) GetId

func (x *Subject) GetId() isSubject_Id

func (*Subject) GetIdentity

func (x *Subject) GetIdentity() *Identity

func (*Subject) GetPrincipal

func (x *Subject) GetPrincipal() *Principal

func (*Subject) ProtoMessage

func (*Subject) ProtoMessage()

func (*Subject) ProtoReflect

func (x *Subject) ProtoReflect() protoreflect.Message

func (*Subject) Reset

func (x *Subject) Reset()

func (*Subject) String

func (x *Subject) String() string

type Subject_Identity

type Subject_Identity struct {
	Identity *Identity `protobuf:"bytes,1,opt,name=identity,proto3,oneof"`
}

type Subject_Principal

type Subject_Principal struct {
	Principal *Principal `protobuf:"bytes,2,opt,name=principal,proto3,oneof"`
}

Jump to

Keyboard shortcuts

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