credential

package
v0.0.0-...-0f6999a Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2023 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	LoginStatus_name = map[int32]string{
		0: "Untried",
		1: "DeniedAccess",
		2: "Disabled",
		3: "LockedOut",
		4: "Sucessful",
		5: "UnableToConnect",
	}
	LoginStatus_value = map[string]int32{
		"Untried":         0,
		"DeniedAccess":    1,
		"Disabled":        2,
		"LockedOut":       3,
		"Sucessful":       4,
		"UnableToConnect": 5,
	}
)

Enum value maps for LoginStatus.

View Source
var (
	OriginType_name = map[int32]string{
		0: "Manual",
		1: "Import",
		2: "CrackedPassword",
		3: "Service",
	}
	OriginType_value = map[string]int32{
		"Manual":          0,
		"Import":          1,
		"CrackedPassword": 2,
		"Service":         3,
	}
)

Enum value maps for OriginType.

View Source
var (
	PrivateType_name = map[int32]string{
		0: "Password",
		1: "BlankPassword",
		2: "ReplayableHash",
		3: "NonReplayableHash",
		4: "NTLMHash",
		5: "PostgresMD5",
		6: "Key",
		7: "JWT",
	}
	PrivateType_value = map[string]int32{
		"Password":          0,
		"BlankPassword":     1,
		"ReplayableHash":    2,
		"NonReplayableHash": 3,
		"NTLMHash":          4,
		"PostgresMD5":       5,
		"Key":               6,
		"JWT":               7,
	}
)

Enum value maps for PrivateType.

View Source
var (
	PublicType_name = map[int32]string{
		0: "Username",
		1: "BlankUsername",
		3: "PublicKey",
		4: "Certificate",
	}
	PublicType_value = map[string]int32{
		"Username":      0,
		"BlankUsername": 1,
		"PublicKey":     3,
		"Certificate":   4,
	}
)

Enum value maps for PublicType.

View Source
var File_credential_core_proto protoreflect.FileDescriptor
View Source
var File_credential_login_proto protoreflect.FileDescriptor
View Source
var File_credential_origin_proto protoreflect.FileDescriptor
View Source
var File_credential_private_proto protoreflect.FileDescriptor
View Source
var File_credential_public_proto protoreflect.FileDescriptor
View Source
var File_credential_realm_proto protoreflect.FileDescriptor

Functions

func DefaultDeleteCore

func DefaultDeleteCore(ctx context.Context, in *Core, db *gorm.DB) error

func DefaultDeleteCoreSet

func DefaultDeleteCoreSet(ctx context.Context, in []*Core, db *gorm.DB) error

func DefaultDeleteLogin

func DefaultDeleteLogin(ctx context.Context, in *Login, db *gorm.DB) error

func DefaultDeleteLoginSet

func DefaultDeleteLoginSet(ctx context.Context, in []*Login, db *gorm.DB) error

func DefaultDeleteOrigin

func DefaultDeleteOrigin(ctx context.Context, in *Origin, db *gorm.DB) error

func DefaultDeleteOriginSet

func DefaultDeleteOriginSet(ctx context.Context, in []*Origin, db *gorm.DB) error

func DefaultDeletePrivate

func DefaultDeletePrivate(ctx context.Context, in *Private, db *gorm.DB) error

func DefaultDeletePrivateSet

func DefaultDeletePrivateSet(ctx context.Context, in []*Private, db *gorm.DB) error

func DefaultDeletePublic

func DefaultDeletePublic(ctx context.Context, in *Public, db *gorm.DB) error

func DefaultDeletePublicSet

func DefaultDeletePublicSet(ctx context.Context, in []*Public, db *gorm.DB) error

func DefaultDeleteRealm

func DefaultDeleteRealm(ctx context.Context, in *Realm, db *gorm.DB) error

func DefaultDeleteRealmSet

func DefaultDeleteRealmSet(ctx context.Context, in []*Realm, db *gorm.DB) error

Types

type Core

type Core struct {
	Id        string                 `protobuf:"bytes,1,opt,name=Id,proto3" json:"Id,omitempty"`
	CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=CreatedAt,proto3" json:"CreatedAt,omitempty"`
	UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=UpdatedAt,proto3" json:"UpdatedAt,omitempty"`
	// Origin - The origin of this Credential.
	Origin *Origin `protobuf:"bytes,10,opt,name=Origin,proto3" json:"Origin,omitempty"`
	// Private - The credential.Private either gathered from Realm,
	// or used to credential.ReplayableHash authenticate into the realm.
	Private *Private `protobuf:"bytes,11,opt,name=Private,proto3" json:"Private,omitempty"`
	// Public - The credential.Public gathered from Realm.
	Public *Public `protobuf:"bytes,12,opt,name=Public,proto3" json:"Public,omitempty"`
	// Realm - credential.Realm where Private and/or Public was gathered
	// and/or the credential.Realm to which Private and/or Public can be
	// used to authenticate.
	Realm *Realm `protobuf:"bytes,13,opt,name=Realm,proto3" json:"Realm,omitempty"`
	// repeated Login Logins = 14;
	LoginsCount int32 `protobuf:"varint,8,opt,name=LoginsCount,proto3" json:"LoginsCount,omitempty"`
	// contains filtered or unexported fields
}

Core credential that combines Private, Public, and/or Realm so that credential.Private or credential.Public that are gathered from a credential.Realm} are properly scoped when used.

A core credential must always have an Origin, but only needs 1 of Private, Public, or Realm set.

func DefaultApplyFieldMaskCore

func DefaultApplyFieldMaskCore(ctx context.Context, patchee *Core, patcher *Core, updateMask *field_mask.FieldMask, prefix string, db *gorm.DB) (*Core, error)

DefaultApplyFieldMaskCore patches an pbObject with patcher according to a field mask.

func DefaultCreateCore

func DefaultCreateCore(ctx context.Context, in *Core, db *gorm.DB) (*Core, error)

DefaultCreateCore executes a basic gorm create call

func DefaultListCore

func DefaultListCore(ctx context.Context, db *gorm.DB) ([]*Core, error)

DefaultListCore executes a gorm list call

func DefaultPatchCore

func DefaultPatchCore(ctx context.Context, in *Core, updateMask *field_mask.FieldMask, db *gorm.DB) (*Core, error)

DefaultPatchCore executes a basic gorm update call with patch behavior

func DefaultPatchSetCore

func DefaultPatchSetCore(ctx context.Context, objects []*Core, updateMasks []*field_mask.FieldMask, db *gorm.DB) ([]*Core, error)

DefaultPatchSetCore executes a bulk gorm update call with patch behavior

func DefaultReadCore

func DefaultReadCore(ctx context.Context, in *Core, db *gorm.DB) (*Core, error)

func DefaultStrictUpdateCore

func DefaultStrictUpdateCore(ctx context.Context, in *Core, db *gorm.DB) (*Core, error)

DefaultStrictUpdateCore clears / replaces / appends first level 1:many children and then executes a gorm update call

func (*Core) Descriptor deprecated

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

Deprecated: Use Core.ProtoReflect.Descriptor instead.

func (*Core) GetCreatedAt

func (x *Core) GetCreatedAt() *timestamppb.Timestamp

func (*Core) GetId

func (x *Core) GetId() string

func (*Core) GetLoginsCount

func (x *Core) GetLoginsCount() int32

func (*Core) GetOrigin

func (x *Core) GetOrigin() *Origin

func (*Core) GetPrivate

func (x *Core) GetPrivate() *Private

func (*Core) GetPublic

func (x *Core) GetPublic() *Public

func (*Core) GetRealm

func (x *Core) GetRealm() *Realm

func (*Core) GetUpdatedAt

func (x *Core) GetUpdatedAt() *timestamppb.Timestamp

func (*Core) ProtoMessage

func (*Core) ProtoMessage()

func (*Core) ProtoReflect

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

func (*Core) Reset

func (x *Core) Reset()

func (*Core) String

func (x *Core) String() string

func (*Core) ToORM

func (m *Core) ToORM(ctx context.Context) (CoreORM, error)

ToORM runs the BeforeToORM hook if present, converts the fields of this object to ORM format, runs the AfterToORM hook, then returns the ORM object

type CoreORM

type CoreORM struct {
	CreatedAt   *time.Time
	Id          string `gorm:"type:uuid;primary_key"`
	LoginId     *string
	LoginsCount int32
	Origin      *OriginORM  `gorm:"not null;foreignkey:CoreId;association_foreignkey:Id"`
	Private     *PrivateORM `gorm:"foreignkey:CoreId;association_foreignkey:Id"`
	Public      *PublicORM  `gorm:"foreignkey:CoreId;association_foreignkey:Id"`
	Realm       *RealmORM   `gorm:"foreignkey:CoreId;association_foreignkey:Id"`
	UpdatedAt   *time.Time
}

func (*CoreORM) BeforeCreate

func (core *CoreORM) BeforeCreate(tx *gorm.DB) (err error)

BeforeCreate - GORM-specific autogenerated helpers.

func (CoreORM) TableName

func (CoreORM) TableName() string

TableName overrides the default tablename generated by GORM

func (*CoreORM) ToPB

func (m *CoreORM) ToPB(ctx context.Context) (Core, error)

ToPB runs the BeforeToPB hook if present, converts the fields of this object to PB format, runs the AfterToPB hook, then returns the PB object

type CoreORMWithAfterCreate_

type CoreORMWithAfterCreate_ interface {
	AfterCreate_(context.Context, *gorm.DB) error
}

type CoreORMWithAfterDeleteSet

type CoreORMWithAfterDeleteSet interface {
	AfterDeleteSet(context.Context, []*Core, *gorm.DB) error
}

type CoreORMWithAfterDelete_

type CoreORMWithAfterDelete_ interface {
	AfterDelete_(context.Context, *gorm.DB) error
}

type CoreORMWithAfterListFind

type CoreORMWithAfterListFind interface {
	AfterListFind(context.Context, *gorm.DB, *[]CoreORM) error
}

type CoreORMWithAfterReadFind

type CoreORMWithAfterReadFind interface {
	AfterReadFind(context.Context, *gorm.DB) error
}

type CoreORMWithAfterStrictUpdateSave

type CoreORMWithAfterStrictUpdateSave interface {
	AfterStrictUpdateSave(context.Context, *gorm.DB) error
}

type CoreORMWithBeforeCreate_

type CoreORMWithBeforeCreate_ interface {
	BeforeCreate_(context.Context, *gorm.DB) (*gorm.DB, error)
}

type CoreORMWithBeforeDeleteSet

type CoreORMWithBeforeDeleteSet interface {
	BeforeDeleteSet(context.Context, []*Core, *gorm.DB) (*gorm.DB, error)
}

type CoreORMWithBeforeDelete_

type CoreORMWithBeforeDelete_ interface {
	BeforeDelete_(context.Context, *gorm.DB) (*gorm.DB, error)
}

type CoreORMWithBeforeListApplyQuery

type CoreORMWithBeforeListApplyQuery interface {
	BeforeListApplyQuery(context.Context, *gorm.DB) (*gorm.DB, error)
}

type CoreORMWithBeforeListFind

type CoreORMWithBeforeListFind interface {
	BeforeListFind(context.Context, *gorm.DB) (*gorm.DB, error)
}

type CoreORMWithBeforeReadApplyQuery

type CoreORMWithBeforeReadApplyQuery interface {
	BeforeReadApplyQuery(context.Context, *gorm.DB) (*gorm.DB, error)
}

type CoreORMWithBeforeReadFind

type CoreORMWithBeforeReadFind interface {
	BeforeReadFind(context.Context, *gorm.DB) (*gorm.DB, error)
}

type CoreORMWithBeforeStrictUpdateCleanup

type CoreORMWithBeforeStrictUpdateCleanup interface {
	BeforeStrictUpdateCleanup(context.Context, *gorm.DB) (*gorm.DB, error)
}

type CoreORMWithBeforeStrictUpdateSave

type CoreORMWithBeforeStrictUpdateSave interface {
	BeforeStrictUpdateSave(context.Context, *gorm.DB) (*gorm.DB, error)
}

type CoreWithAfterPatchSave

type CoreWithAfterPatchSave interface {
	AfterPatchSave(context.Context, *Core, *field_mask.FieldMask, *gorm.DB) error
}

type CoreWithAfterToORM

type CoreWithAfterToORM interface {
	AfterToORM(context.Context, *CoreORM) error
}

CoreAfterToORM called after default ToORM code

type CoreWithAfterToPB

type CoreWithAfterToPB interface {
	AfterToPB(context.Context, *Core) error
}

CoreAfterToPB called after default ToPB code

type CoreWithBeforePatchApplyFieldMask

type CoreWithBeforePatchApplyFieldMask interface {
	BeforePatchApplyFieldMask(context.Context, *Core, *field_mask.FieldMask, *gorm.DB) (*gorm.DB, error)
}

type CoreWithBeforePatchRead

type CoreWithBeforePatchRead interface {
	BeforePatchRead(context.Context, *Core, *field_mask.FieldMask, *gorm.DB) (*gorm.DB, error)
}

type CoreWithBeforePatchSave

type CoreWithBeforePatchSave interface {
	BeforePatchSave(context.Context, *Core, *field_mask.FieldMask, *gorm.DB) (*gorm.DB, error)
}

type CoreWithBeforeToORM

type CoreWithBeforeToORM interface {
	BeforeToORM(context.Context, *CoreORM) error
}

CoreBeforeToORM called before default ToORM code

type CoreWithBeforeToPB

type CoreWithBeforeToPB interface {
	BeforeToPB(context.Context, *Core) error
}

CoreBeforeToPB called before default ToPB code

type Login

type Login struct {
	Id        string                 `protobuf:"bytes,1,opt,name=Id,proto3" json:"Id,omitempty"`
	CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=CreatedAt,proto3" json:"CreatedAt,omitempty"`
	UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=UpdatedAt,proto3" json:"UpdatedAt,omitempty"`
	// string CoreId = 10 [(gorm.field).tag = {type:"uuid" primary_key: true}];
	LastAttemptedAt *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=LastAttemptedAt,proto3" json:"LastAttemptedAt,omitempty"`
	AccessLevel     string                 `protobuf:"bytes,20,opt,name=AccessLevel,proto3" json:"AccessLevel,omitempty"`
	Status          LoginStatus            `protobuf:"varint,21,opt,name=Status,proto3,enum=credential.LoginStatus" json:"Status,omitempty"`
	// Core - The credential.Core used to authenticate to Service
	Core *Core `protobuf:"bytes,13,opt,name=Core,proto3" json:"Core,omitempty"`
	// Service - The service that either accepted the credential.Core as valid, invalid,
	// or on which the credential.Core should be tested to see if it is valid.
	Service *network.Service `protobuf:"bytes,22,opt,name=Service,proto3" json:"Service,omitempty"`
	// The host on which Service runs
	HostId string `protobuf:"bytes,23,opt,name=HostId,proto3" json:"HostId,omitempty"`
	// contains filtered or unexported fields
}

Login - The use of a credential.Core against a service.

func DefaultApplyFieldMaskLogin

func DefaultApplyFieldMaskLogin(ctx context.Context, patchee *Login, patcher *Login, updateMask *field_mask.FieldMask, prefix string, db *gorm.DB) (*Login, error)

DefaultApplyFieldMaskLogin patches an pbObject with patcher according to a field mask.

func DefaultCreateLogin

func DefaultCreateLogin(ctx context.Context, in *Login, db *gorm.DB) (*Login, error)

DefaultCreateLogin executes a basic gorm create call

func DefaultListLogin

func DefaultListLogin(ctx context.Context, db *gorm.DB) ([]*Login, error)

DefaultListLogin executes a gorm list call

func DefaultPatchLogin

func DefaultPatchLogin(ctx context.Context, in *Login, updateMask *field_mask.FieldMask, db *gorm.DB) (*Login, error)

DefaultPatchLogin executes a basic gorm update call with patch behavior

func DefaultPatchSetLogin

func DefaultPatchSetLogin(ctx context.Context, objects []*Login, updateMasks []*field_mask.FieldMask, db *gorm.DB) ([]*Login, error)

DefaultPatchSetLogin executes a bulk gorm update call with patch behavior

func DefaultReadLogin

func DefaultReadLogin(ctx context.Context, in *Login, db *gorm.DB) (*Login, error)

func DefaultStrictUpdateLogin

func DefaultStrictUpdateLogin(ctx context.Context, in *Login, db *gorm.DB) (*Login, error)

DefaultStrictUpdateLogin clears / replaces / appends first level 1:many children and then executes a gorm update call

func (*Login) Descriptor deprecated

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

Deprecated: Use Login.ProtoReflect.Descriptor instead.

func (*Login) GetAccessLevel

func (x *Login) GetAccessLevel() string

func (*Login) GetCore

func (x *Login) GetCore() *Core

func (*Login) GetCreatedAt

func (x *Login) GetCreatedAt() *timestamppb.Timestamp

func (*Login) GetHostId

func (x *Login) GetHostId() string

func (*Login) GetId

func (x *Login) GetId() string

func (*Login) GetLastAttemptedAt

func (x *Login) GetLastAttemptedAt() *timestamppb.Timestamp

func (*Login) GetService

func (x *Login) GetService() *network.Service

func (*Login) GetStatus

func (x *Login) GetStatus() LoginStatus

func (*Login) GetUpdatedAt

func (x *Login) GetUpdatedAt() *timestamppb.Timestamp

func (*Login) ProtoMessage

func (*Login) ProtoMessage()

func (*Login) ProtoReflect

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

func (*Login) Reset

func (x *Login) Reset()

func (*Login) String

func (x *Login) String() string

func (*Login) ToORM

func (m *Login) ToORM(ctx context.Context) (LoginORM, error)

ToORM runs the BeforeToORM hook if present, converts the fields of this object to ORM format, runs the AfterToORM hook, then returns the ORM object

type LoginORM

type LoginORM struct {
	AccessLevel     string
	Core            *CoreORM `gorm:"not null;foreignkey:LoginId;association_foreignkey:Id"`
	CreatedAt       *time.Time
	HostId          string `gorm:"type:uuid;not null"`
	Id              string `gorm:"type:uuid;primary_key"`
	LastAttemptedAt *time.Time
	Service         *network.ServiceORM `gorm:"foreignkey:ServiceId;association_foreignkey:Id"`
	ServiceId       *string
	Status          int32
	UpdatedAt       *time.Time
}

func (*LoginORM) BeforeCreate

func (login *LoginORM) BeforeCreate(tx *gorm.DB) (err error)

BeforeCreate - GORM-specific autogenerated helpers.

func (LoginORM) TableName

func (LoginORM) TableName() string

TableName overrides the default tablename generated by GORM

func (*LoginORM) ToPB

func (m *LoginORM) ToPB(ctx context.Context) (Login, error)

ToPB runs the BeforeToPB hook if present, converts the fields of this object to PB format, runs the AfterToPB hook, then returns the PB object

type LoginORMWithAfterCreate_

type LoginORMWithAfterCreate_ interface {
	AfterCreate_(context.Context, *gorm.DB) error
}

type LoginORMWithAfterDeleteSet

type LoginORMWithAfterDeleteSet interface {
	AfterDeleteSet(context.Context, []*Login, *gorm.DB) error
}

type LoginORMWithAfterDelete_

type LoginORMWithAfterDelete_ interface {
	AfterDelete_(context.Context, *gorm.DB) error
}

type LoginORMWithAfterListFind

type LoginORMWithAfterListFind interface {
	AfterListFind(context.Context, *gorm.DB, *[]LoginORM) error
}

type LoginORMWithAfterReadFind

type LoginORMWithAfterReadFind interface {
	AfterReadFind(context.Context, *gorm.DB) error
}

type LoginORMWithAfterStrictUpdateSave

type LoginORMWithAfterStrictUpdateSave interface {
	AfterStrictUpdateSave(context.Context, *gorm.DB) error
}

type LoginORMWithBeforeCreate_

type LoginORMWithBeforeCreate_ interface {
	BeforeCreate_(context.Context, *gorm.DB) (*gorm.DB, error)
}

type LoginORMWithBeforeDeleteSet

type LoginORMWithBeforeDeleteSet interface {
	BeforeDeleteSet(context.Context, []*Login, *gorm.DB) (*gorm.DB, error)
}

type LoginORMWithBeforeDelete_

type LoginORMWithBeforeDelete_ interface {
	BeforeDelete_(context.Context, *gorm.DB) (*gorm.DB, error)
}

type LoginORMWithBeforeListApplyQuery

type LoginORMWithBeforeListApplyQuery interface {
	BeforeListApplyQuery(context.Context, *gorm.DB) (*gorm.DB, error)
}

type LoginORMWithBeforeListFind

type LoginORMWithBeforeListFind interface {
	BeforeListFind(context.Context, *gorm.DB) (*gorm.DB, error)
}

type LoginORMWithBeforeReadApplyQuery

type LoginORMWithBeforeReadApplyQuery interface {
	BeforeReadApplyQuery(context.Context, *gorm.DB) (*gorm.DB, error)
}

type LoginORMWithBeforeReadFind

type LoginORMWithBeforeReadFind interface {
	BeforeReadFind(context.Context, *gorm.DB) (*gorm.DB, error)
}

type LoginORMWithBeforeStrictUpdateCleanup

type LoginORMWithBeforeStrictUpdateCleanup interface {
	BeforeStrictUpdateCleanup(context.Context, *gorm.DB) (*gorm.DB, error)
}

type LoginORMWithBeforeStrictUpdateSave

type LoginORMWithBeforeStrictUpdateSave interface {
	BeforeStrictUpdateSave(context.Context, *gorm.DB) (*gorm.DB, error)
}

type LoginStatus

type LoginStatus int32

LoginStatus - The state of a credential.Login.

const (
	LoginStatus_Untried         LoginStatus = 0
	LoginStatus_DeniedAccess    LoginStatus = 1
	LoginStatus_Disabled        LoginStatus = 2
	LoginStatus_LockedOut       LoginStatus = 3
	LoginStatus_Sucessful       LoginStatus = 4
	LoginStatus_UnableToConnect LoginStatus = 5
)

func (LoginStatus) Descriptor

func (LoginStatus) Enum

func (x LoginStatus) Enum() *LoginStatus

func (LoginStatus) EnumDescriptor deprecated

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

Deprecated: Use LoginStatus.Descriptor instead.

func (LoginStatus) Number

func (x LoginStatus) Number() protoreflect.EnumNumber

func (LoginStatus) String

func (x LoginStatus) String() string

func (LoginStatus) Type

type LoginWithAfterPatchSave

type LoginWithAfterPatchSave interface {
	AfterPatchSave(context.Context, *Login, *field_mask.FieldMask, *gorm.DB) error
}

type LoginWithAfterToORM

type LoginWithAfterToORM interface {
	AfterToORM(context.Context, *LoginORM) error
}

LoginAfterToORM called after default ToORM code

type LoginWithAfterToPB

type LoginWithAfterToPB interface {
	AfterToPB(context.Context, *Login) error
}

LoginAfterToPB called after default ToPB code

type LoginWithBeforePatchApplyFieldMask

type LoginWithBeforePatchApplyFieldMask interface {
	BeforePatchApplyFieldMask(context.Context, *Login, *field_mask.FieldMask, *gorm.DB) (*gorm.DB, error)
}

type LoginWithBeforePatchRead

type LoginWithBeforePatchRead interface {
	BeforePatchRead(context.Context, *Login, *field_mask.FieldMask, *gorm.DB) (*gorm.DB, error)
}

type LoginWithBeforePatchSave

type LoginWithBeforePatchSave interface {
	BeforePatchSave(context.Context, *Login, *field_mask.FieldMask, *gorm.DB) (*gorm.DB, error)
}

type LoginWithBeforeToORM

type LoginWithBeforeToORM interface {
	BeforeToORM(context.Context, *LoginORM) error
}

LoginBeforeToORM called before default ToORM code

type LoginWithBeforeToPB

type LoginWithBeforeToPB interface {
	BeforeToPB(context.Context, *Login) error
}

LoginBeforeToPB called before default ToPB code

type Origin

type Origin struct {
	Id        string                 `protobuf:"bytes,1,opt,name=Id,proto3" json:"Id,omitempty"`
	CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=CreatedAt,proto3" json:"CreatedAt,omitempty"`
	UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=UpdatedAt,proto3" json:"UpdatedAt,omitempty"`
	// Common
	SessionId string     `protobuf:"bytes,10,opt,name=SessionId,proto3" json:"SessionId,omitempty"`
	Type      OriginType `protobuf:"varint,11,opt,name=Type,proto3,enum=credential.OriginType" json:"Type,omitempty"`
	// Origin Import
	// Filename - The `File.basename` of the file from which the credential.Cores were imported.
	// Because only a basename is available, a Filename may be used more than once for the same task.
	Filename string `protobuf:"bytes,20,opt,name=Filename,proto3" json:"Filename,omitempty"`
	// Origin CrackedPassword
	Cracker string `protobuf:"bytes,30,opt,name=Cracker,proto3" json:"Cracker,omitempty"` // The name of the cracking tool
	// Origin Service
	Service *network.Service `protobuf:"bytes,40,opt,name=Service,proto3" json:"Service,omitempty"`
	// contains filtered or unexported fields
}

Origin - The origin of a credential.Core, with any information related to the Origin.Type, which might manual, imports, services, crackers, etc.

func DefaultApplyFieldMaskOrigin

func DefaultApplyFieldMaskOrigin(ctx context.Context, patchee *Origin, patcher *Origin, updateMask *field_mask.FieldMask, prefix string, db *gorm.DB) (*Origin, error)

DefaultApplyFieldMaskOrigin patches an pbObject with patcher according to a field mask.

func DefaultCreateOrigin

func DefaultCreateOrigin(ctx context.Context, in *Origin, db *gorm.DB) (*Origin, error)

DefaultCreateOrigin executes a basic gorm create call

func DefaultListOrigin

func DefaultListOrigin(ctx context.Context, db *gorm.DB) ([]*Origin, error)

DefaultListOrigin executes a gorm list call

func DefaultPatchOrigin

func DefaultPatchOrigin(ctx context.Context, in *Origin, updateMask *field_mask.FieldMask, db *gorm.DB) (*Origin, error)

DefaultPatchOrigin executes a basic gorm update call with patch behavior

func DefaultPatchSetOrigin

func DefaultPatchSetOrigin(ctx context.Context, objects []*Origin, updateMasks []*field_mask.FieldMask, db *gorm.DB) ([]*Origin, error)

DefaultPatchSetOrigin executes a bulk gorm update call with patch behavior

func DefaultReadOrigin

func DefaultReadOrigin(ctx context.Context, in *Origin, db *gorm.DB) (*Origin, error)

func DefaultStrictUpdateOrigin

func DefaultStrictUpdateOrigin(ctx context.Context, in *Origin, db *gorm.DB) (*Origin, error)

DefaultStrictUpdateOrigin clears / replaces / appends first level 1:many children and then executes a gorm update call

func (*Origin) Descriptor deprecated

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

Deprecated: Use Origin.ProtoReflect.Descriptor instead.

func (*Origin) GetCracker

func (x *Origin) GetCracker() string

func (*Origin) GetCreatedAt

func (x *Origin) GetCreatedAt() *timestamppb.Timestamp

func (*Origin) GetFilename

func (x *Origin) GetFilename() string

func (*Origin) GetId

func (x *Origin) GetId() string

func (*Origin) GetService

func (x *Origin) GetService() *network.Service

func (*Origin) GetSessionId

func (x *Origin) GetSessionId() string

func (*Origin) GetType

func (x *Origin) GetType() OriginType

func (*Origin) GetUpdatedAt

func (x *Origin) GetUpdatedAt() *timestamppb.Timestamp

func (*Origin) ProtoMessage

func (*Origin) ProtoMessage()

func (*Origin) ProtoReflect

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

func (*Origin) Reset

func (x *Origin) Reset()

func (*Origin) String

func (x *Origin) String() string

func (*Origin) ToORM

func (m *Origin) ToORM(ctx context.Context) (OriginORM, error)

ToORM runs the BeforeToORM hook if present, converts the fields of this object to ORM format, runs the AfterToORM hook, then returns the ORM object

type OriginORM

type OriginORM struct {
	CoreId    *string
	Cracker   string
	CreatedAt *time.Time
	Filename  string
	Id        string              `gorm:"type:uuid;primary_key"`
	Service   *network.ServiceORM `gorm:"foreignkey:ServiceId;association_foreignkey:Id"`
	ServiceId *string
	SessionId string
	Type      int32
	UpdatedAt *time.Time
}

func (*OriginORM) BeforeCreate

func (origin *OriginORM) BeforeCreate(tx *gorm.DB) (err error)

BeforeCreate - GORM-specific autogenerated helpers.

func (OriginORM) TableName

func (OriginORM) TableName() string

TableName overrides the default tablename generated by GORM

func (*OriginORM) ToPB

func (m *OriginORM) ToPB(ctx context.Context) (Origin, error)

ToPB runs the BeforeToPB hook if present, converts the fields of this object to PB format, runs the AfterToPB hook, then returns the PB object

type OriginORMWithAfterCreate_

type OriginORMWithAfterCreate_ interface {
	AfterCreate_(context.Context, *gorm.DB) error
}

type OriginORMWithAfterDeleteSet

type OriginORMWithAfterDeleteSet interface {
	AfterDeleteSet(context.Context, []*Origin, *gorm.DB) error
}

type OriginORMWithAfterDelete_

type OriginORMWithAfterDelete_ interface {
	AfterDelete_(context.Context, *gorm.DB) error
}

type OriginORMWithAfterListFind

type OriginORMWithAfterListFind interface {
	AfterListFind(context.Context, *gorm.DB, *[]OriginORM) error
}

type OriginORMWithAfterReadFind

type OriginORMWithAfterReadFind interface {
	AfterReadFind(context.Context, *gorm.DB) error
}

type OriginORMWithAfterStrictUpdateSave

type OriginORMWithAfterStrictUpdateSave interface {
	AfterStrictUpdateSave(context.Context, *gorm.DB) error
}

type OriginORMWithBeforeCreate_

type OriginORMWithBeforeCreate_ interface {
	BeforeCreate_(context.Context, *gorm.DB) (*gorm.DB, error)
}

type OriginORMWithBeforeDeleteSet

type OriginORMWithBeforeDeleteSet interface {
	BeforeDeleteSet(context.Context, []*Origin, *gorm.DB) (*gorm.DB, error)
}

type OriginORMWithBeforeDelete_

type OriginORMWithBeforeDelete_ interface {
	BeforeDelete_(context.Context, *gorm.DB) (*gorm.DB, error)
}

type OriginORMWithBeforeListApplyQuery

type OriginORMWithBeforeListApplyQuery interface {
	BeforeListApplyQuery(context.Context, *gorm.DB) (*gorm.DB, error)
}

type OriginORMWithBeforeListFind

type OriginORMWithBeforeListFind interface {
	BeforeListFind(context.Context, *gorm.DB) (*gorm.DB, error)
}

type OriginORMWithBeforeReadApplyQuery

type OriginORMWithBeforeReadApplyQuery interface {
	BeforeReadApplyQuery(context.Context, *gorm.DB) (*gorm.DB, error)
}

type OriginORMWithBeforeReadFind

type OriginORMWithBeforeReadFind interface {
	BeforeReadFind(context.Context, *gorm.DB) (*gorm.DB, error)
}

type OriginORMWithBeforeStrictUpdateCleanup

type OriginORMWithBeforeStrictUpdateCleanup interface {
	BeforeStrictUpdateCleanup(context.Context, *gorm.DB) (*gorm.DB, error)
}

type OriginORMWithBeforeStrictUpdateSave

type OriginORMWithBeforeStrictUpdateSave interface {
	BeforeStrictUpdateSave(context.Context, *gorm.DB) (*gorm.DB, error)
}

type OriginType

type OriginType int32

OriginType - Valid origins for a credential.Core

const (
	// Manual - A manually added credential. This includes
	// strings given as arguments to a command-line application.
	OriginType_Manual OriginType = 0
	// OriginImport - An origin for core credentials that were
	// imported from a file, which can be of various formats,
	// and contain list of credentials as well as a single key.
	OriginType_Import OriginType = 1
	// OriginCrackedPassword - An origin for core credentials that
	// were cracked from an originating credential.Core credential.
	OriginType_CrackedPassword OriginType = 2
	// OriginService - Origin of a credential.Core that has been
	// gathered from a service through some means of interaction
	// with it, for instance Metasploit auxiliary/exploit modules.
	OriginType_Service OriginType = 3
)

func (OriginType) Descriptor

func (OriginType) Descriptor() protoreflect.EnumDescriptor

func (OriginType) Enum

func (x OriginType) Enum() *OriginType

func (OriginType) EnumDescriptor deprecated

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

Deprecated: Use OriginType.Descriptor instead.

func (OriginType) Number

func (x OriginType) Number() protoreflect.EnumNumber

func (OriginType) String

func (x OriginType) String() string

func (OriginType) Type

type OriginWithAfterPatchSave

type OriginWithAfterPatchSave interface {
	AfterPatchSave(context.Context, *Origin, *field_mask.FieldMask, *gorm.DB) error
}

type OriginWithAfterToORM

type OriginWithAfterToORM interface {
	AfterToORM(context.Context, *OriginORM) error
}

OriginAfterToORM called after default ToORM code

type OriginWithAfterToPB

type OriginWithAfterToPB interface {
	AfterToPB(context.Context, *Origin) error
}

OriginAfterToPB called after default ToPB code

type OriginWithBeforePatchApplyFieldMask

type OriginWithBeforePatchApplyFieldMask interface {
	BeforePatchApplyFieldMask(context.Context, *Origin, *field_mask.FieldMask, *gorm.DB) (*gorm.DB, error)
}

type OriginWithBeforePatchRead

type OriginWithBeforePatchRead interface {
	BeforePatchRead(context.Context, *Origin, *field_mask.FieldMask, *gorm.DB) (*gorm.DB, error)
}

type OriginWithBeforePatchSave

type OriginWithBeforePatchSave interface {
	BeforePatchSave(context.Context, *Origin, *field_mask.FieldMask, *gorm.DB) (*gorm.DB, error)
}

type OriginWithBeforeToORM

type OriginWithBeforeToORM interface {
	BeforeToORM(context.Context, *OriginORM) error
}

OriginBeforeToORM called before default ToORM code

type OriginWithBeforeToPB

type OriginWithBeforeToPB interface {
	BeforeToPB(context.Context, *Origin) error
}

OriginBeforeToPB called before default ToPB code

type Private

type Private struct {
	Id string `protobuf:"bytes,1,opt,name=Id,proto3" json:"Id,omitempty"`
	// @gotags: display:"Created at" readonly:"true"
	CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=CreatedAt,proto3" json:"CreatedAt,omitempty" display:"Created at" readonly:"true"`
	// @gotags: display:"Updated at" readonly:"true"
	UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=UpdatedAt,proto3" json:"UpdatedAt,omitempty" display:"Updated at" readonly:"true"`
	// @gotags: display:"Type" readonly:"true"
	Type PrivateType `protobuf:"varint,10,opt,name=Type,proto3,enum=credential.PrivateType" json:"Type,omitempty" display:"Type" readonly:"true"`
	// No data passed into Maltego at this point.
	Data string `protobuf:"bytes,11,opt,name=Data,proto3" json:"Data,omitempty"`
	// @gotags: display:"JTR Format" readonly:"true"
	JTRFormat string `protobuf:"bytes,12,opt,name=JTRFormat,proto3" json:"JTRFormat,omitempty" display:"JTR Format" readonly:"true"`
	// contains filtered or unexported fields
}

Private - Any credential that should not be publicly exposed.

func DefaultApplyFieldMaskPrivate

func DefaultApplyFieldMaskPrivate(ctx context.Context, patchee *Private, patcher *Private, updateMask *field_mask.FieldMask, prefix string, db *gorm.DB) (*Private, error)

DefaultApplyFieldMaskPrivate patches an pbObject with patcher according to a field mask.

func DefaultCreatePrivate

func DefaultCreatePrivate(ctx context.Context, in *Private, db *gorm.DB) (*Private, error)

DefaultCreatePrivate executes a basic gorm create call

func DefaultListPrivate

func DefaultListPrivate(ctx context.Context, db *gorm.DB) ([]*Private, error)

DefaultListPrivate executes a gorm list call

func DefaultPatchPrivate

func DefaultPatchPrivate(ctx context.Context, in *Private, updateMask *field_mask.FieldMask, db *gorm.DB) (*Private, error)

DefaultPatchPrivate executes a basic gorm update call with patch behavior

func DefaultPatchSetPrivate

func DefaultPatchSetPrivate(ctx context.Context, objects []*Private, updateMasks []*field_mask.FieldMask, db *gorm.DB) ([]*Private, error)

DefaultPatchSetPrivate executes a bulk gorm update call with patch behavior

func DefaultReadPrivate

func DefaultReadPrivate(ctx context.Context, in *Private, db *gorm.DB) (*Private, error)

func DefaultStrictUpdatePrivate

func DefaultStrictUpdatePrivate(ctx context.Context, in *Private, db *gorm.DB) (*Private, error)

DefaultStrictUpdatePrivate clears / replaces / appends first level 1:many children and then executes a gorm update call

func (*Private) Descriptor deprecated

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

Deprecated: Use Private.ProtoReflect.Descriptor instead.

func (*Private) GetCreatedAt

func (x *Private) GetCreatedAt() *timestamppb.Timestamp

func (*Private) GetData

func (x *Private) GetData() string

func (*Private) GetId

func (x *Private) GetId() string

func (*Private) GetJTRFormat

func (x *Private) GetJTRFormat() string

func (*Private) GetType

func (x *Private) GetType() PrivateType

func (*Private) GetUpdatedAt

func (x *Private) GetUpdatedAt() *timestamppb.Timestamp

func (*Private) ProtoMessage

func (*Private) ProtoMessage()

func (*Private) ProtoReflect

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

func (*Private) Reset

func (x *Private) Reset()

func (*Private) String

func (x *Private) String() string

func (*Private) ToORM

func (m *Private) ToORM(ctx context.Context) (PrivateORM, error)

ToORM runs the BeforeToORM hook if present, converts the fields of this object to ORM format, runs the AfterToORM hook, then returns the ORM object

type PrivateORM

type PrivateORM struct {
	CoreId    *string
	CreatedAt *time.Time
	Data      string
	Id        string `gorm:"type:uuid;primary_key"`
	JTRFormat string
	Type      int32
	UpdatedAt *time.Time
}

func (*PrivateORM) BeforeCreate

func (private *PrivateORM) BeforeCreate(tx *gorm.DB) (err error)

BeforeCreate - GORM-specific autogenerated helpers.

func (PrivateORM) TableName

func (PrivateORM) TableName() string

TableName overrides the default tablename generated by GORM

func (*PrivateORM) ToPB

func (m *PrivateORM) ToPB(ctx context.Context) (Private, error)

ToPB runs the BeforeToPB hook if present, converts the fields of this object to PB format, runs the AfterToPB hook, then returns the PB object

type PrivateORMWithAfterCreate_

type PrivateORMWithAfterCreate_ interface {
	AfterCreate_(context.Context, *gorm.DB) error
}

type PrivateORMWithAfterDeleteSet

type PrivateORMWithAfterDeleteSet interface {
	AfterDeleteSet(context.Context, []*Private, *gorm.DB) error
}

type PrivateORMWithAfterDelete_

type PrivateORMWithAfterDelete_ interface {
	AfterDelete_(context.Context, *gorm.DB) error
}

type PrivateORMWithAfterListFind

type PrivateORMWithAfterListFind interface {
	AfterListFind(context.Context, *gorm.DB, *[]PrivateORM) error
}

type PrivateORMWithAfterReadFind

type PrivateORMWithAfterReadFind interface {
	AfterReadFind(context.Context, *gorm.DB) error
}

type PrivateORMWithAfterStrictUpdateSave

type PrivateORMWithAfterStrictUpdateSave interface {
	AfterStrictUpdateSave(context.Context, *gorm.DB) error
}

type PrivateORMWithBeforeCreate_

type PrivateORMWithBeforeCreate_ interface {
	BeforeCreate_(context.Context, *gorm.DB) (*gorm.DB, error)
}

type PrivateORMWithBeforeDeleteSet

type PrivateORMWithBeforeDeleteSet interface {
	BeforeDeleteSet(context.Context, []*Private, *gorm.DB) (*gorm.DB, error)
}

type PrivateORMWithBeforeDelete_

type PrivateORMWithBeforeDelete_ interface {
	BeforeDelete_(context.Context, *gorm.DB) (*gorm.DB, error)
}

type PrivateORMWithBeforeListApplyQuery

type PrivateORMWithBeforeListApplyQuery interface {
	BeforeListApplyQuery(context.Context, *gorm.DB) (*gorm.DB, error)
}

type PrivateORMWithBeforeListFind

type PrivateORMWithBeforeListFind interface {
	BeforeListFind(context.Context, *gorm.DB) (*gorm.DB, error)
}

type PrivateORMWithBeforeReadApplyQuery

type PrivateORMWithBeforeReadApplyQuery interface {
	BeforeReadApplyQuery(context.Context, *gorm.DB) (*gorm.DB, error)
}

type PrivateORMWithBeforeReadFind

type PrivateORMWithBeforeReadFind interface {
	BeforeReadFind(context.Context, *gorm.DB) (*gorm.DB, error)
}

type PrivateORMWithBeforeStrictUpdateCleanup

type PrivateORMWithBeforeStrictUpdateCleanup interface {
	BeforeStrictUpdateCleanup(context.Context, *gorm.DB) (*gorm.DB, error)
}

type PrivateORMWithBeforeStrictUpdateSave

type PrivateORMWithBeforeStrictUpdateSave interface {
	BeforeStrictUpdateSave(context.Context, *gorm.DB) (*gorm.DB, error)
}

type PrivateType

type PrivateType int32

PrivateType - The type of a Private credential. Each of these types might trigger different validations when using fetching/creating Private in DB.

const (
	// A password is the default type, such that if the Private.Data is
	// empty, the type will not be able to save itself in DB without
	// explicitely specifying either its .Type field, or by creating a
	// credential.BlankPassword first.
	PrivateType_Password      PrivateType = 0
	PrivateType_BlankPassword PrivateType = 1
	// ReplayableHash - A credential.PasswordHash password hash that
	// can be replayed to authenticate to additional services.
	PrivateType_ReplayableHash PrivateType = 2
	// NonReplayableHash - A credential.PasswordHash password hash that
	// cannot be replayed to authenticate to other services. Contrasts
	// with credential.ReplayableHash. The NonReplayableHash.Data is any
	// password hash, such as those recovered from `/etc/passwd` or `/etc/shadow`.
	PrivateType_NonReplayableHash PrivateType = 3
	// NTLMHash - A credential.Private password hash that can be credential.ReplayableHash replayed
	// to authenticate to SMB.  It is composed of two hash hex digests (where the hash bytes are
	// printed as a hexadecimal string where 2 characters represent a byte of the original hash with
	// the high nibble first): (1) {lanManagerHexDigestRegexp, the LAN Manager hash's hex digest} and
	// (2) {ntLanManagerHexDigestRegexp, the NTLM hash's hex digest}.
	PrivateType_NTLMHash PrivateType = 4
	// PostgresMD5 - A credential.Private.PasswordHash password hash that can be
	// credential.Private.ReplayableHash replayed to authenticate to PostgreSQL
	// servers. It is composed of a hexadecimal string of 32 characters prepended
	// by the string 'md5'
	PrivateType_PostgresMD5 PrivateType = 5
	// Key - Usually a cryptographic key. When the credential is of this
	// type, various validations are performed on the formatting, encoding
	// potential encryption of the key data, etc.
	// As well, various methods are provided to get cipher and fingerprints.
	PrivateType_Key PrivateType = 6
	// JWT - When the private credential is a JSON Web Token, it is used
	// in conjunction with a given credential.Public to create a JWT string
	// stored in its .Data field.
	// As well, some other types (eg. credential.Core) allow you to create
	// JWT from their own data, like usernames, public/private key pairs, etc.
	PrivateType_JWT PrivateType = 7
)

func (PrivateType) Descriptor

func (PrivateType) Enum

func (x PrivateType) Enum() *PrivateType

func (PrivateType) EnumDescriptor deprecated

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

Deprecated: Use PrivateType.Descriptor instead.

func (PrivateType) Number

func (x PrivateType) Number() protoreflect.EnumNumber

func (PrivateType) String

func (x PrivateType) String() string

func (PrivateType) Type

type PrivateWithAfterPatchSave

type PrivateWithAfterPatchSave interface {
	AfterPatchSave(context.Context, *Private, *field_mask.FieldMask, *gorm.DB) error
}

type PrivateWithAfterToORM

type PrivateWithAfterToORM interface {
	AfterToORM(context.Context, *PrivateORM) error
}

PrivateAfterToORM called after default ToORM code

type PrivateWithAfterToPB

type PrivateWithAfterToPB interface {
	AfterToPB(context.Context, *Private) error
}

PrivateAfterToPB called after default ToPB code

type PrivateWithBeforePatchApplyFieldMask

type PrivateWithBeforePatchApplyFieldMask interface {
	BeforePatchApplyFieldMask(context.Context, *Private, *field_mask.FieldMask, *gorm.DB) (*gorm.DB, error)
}

type PrivateWithBeforePatchRead

type PrivateWithBeforePatchRead interface {
	BeforePatchRead(context.Context, *Private, *field_mask.FieldMask, *gorm.DB) (*gorm.DB, error)
}

type PrivateWithBeforePatchSave

type PrivateWithBeforePatchSave interface {
	BeforePatchSave(context.Context, *Private, *field_mask.FieldMask, *gorm.DB) (*gorm.DB, error)
}

type PrivateWithBeforeToORM

type PrivateWithBeforeToORM interface {
	BeforeToORM(context.Context, *PrivateORM) error
}

PrivateBeforeToORM called before default ToORM code

type PrivateWithBeforeToPB

type PrivateWithBeforeToPB interface {
	BeforeToPB(context.Context, *Private) error
}

PrivateBeforeToPB called before default ToPB code

type Public

type Public struct {
	Id string `protobuf:"bytes,1,opt,name=Id,proto3" json:"Id,omitempty"`
	// @gotags: display:"Created at" readonly:"true"
	CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=CreatedAt,proto3" json:"CreatedAt,omitempty" display:"Created at" readonly:"true"`
	// @gotags: display:"Updated at" readonly:"true"
	UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=UpdatedAt,proto3" json:"UpdatedAt,omitempty" display:"Updated at" readonly:"true"`
	// @gotags: display:"Type" readonly:"true"
	Type PublicType `protobuf:"varint,10,opt,name=Type,proto3,enum=credential.PublicType" json:"Type,omitempty" display:"Type" readonly:"true"`
	// @gotags: display:"Username" readonly:"true"
	Username string `protobuf:"bytes,11,opt,name=Username,proto3" json:"Username,omitempty" display:"Username" readonly:"true"`
	// Data - When the Public credential is a cryptographic key/certificate
	// rather than a username, the key/certificate data is stored in this field.
	// @gotags: display:"Data" readonly:"true"
	Data string `protobuf:"bytes,12,opt,name=Data,proto3" json:"Data,omitempty" display:"Data" readonly:"true"`
	// Claims - Some public credentials, such as JSON Web Tokens,
	// can bear claims, which are a list of key-value pairs. These
	// claims are stored as the bytes of a JSON-marshalled map[string]interface{}
	// A method is provided for credentials to get this map.
	// @gotags: display:"Claims" readonly:"true"
	Claims string `protobuf:"bytes,13,opt,name=Claims,proto3" json:"Claims,omitempty" display:"Claims" readonly:"true"`
	// contains filtered or unexported fields
}

Public - A publicly disclosed credential (ex: username)

func DefaultApplyFieldMaskPublic

func DefaultApplyFieldMaskPublic(ctx context.Context, patchee *Public, patcher *Public, updateMask *field_mask.FieldMask, prefix string, db *gorm.DB) (*Public, error)

DefaultApplyFieldMaskPublic patches an pbObject with patcher according to a field mask.

func DefaultCreatePublic

func DefaultCreatePublic(ctx context.Context, in *Public, db *gorm.DB) (*Public, error)

DefaultCreatePublic executes a basic gorm create call

func DefaultListPublic

func DefaultListPublic(ctx context.Context, db *gorm.DB) ([]*Public, error)

DefaultListPublic executes a gorm list call

func DefaultPatchPublic

func DefaultPatchPublic(ctx context.Context, in *Public, updateMask *field_mask.FieldMask, db *gorm.DB) (*Public, error)

DefaultPatchPublic executes a basic gorm update call with patch behavior

func DefaultPatchSetPublic

func DefaultPatchSetPublic(ctx context.Context, objects []*Public, updateMasks []*field_mask.FieldMask, db *gorm.DB) ([]*Public, error)

DefaultPatchSetPublic executes a bulk gorm update call with patch behavior

func DefaultReadPublic

func DefaultReadPublic(ctx context.Context, in *Public, db *gorm.DB) (*Public, error)

func DefaultStrictUpdatePublic

func DefaultStrictUpdatePublic(ctx context.Context, in *Public, db *gorm.DB) (*Public, error)

DefaultStrictUpdatePublic clears / replaces / appends first level 1:many children and then executes a gorm update call

func (*Public) Descriptor deprecated

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

Deprecated: Use Public.ProtoReflect.Descriptor instead.

func (*Public) GetClaims

func (x *Public) GetClaims() string

func (*Public) GetCreatedAt

func (x *Public) GetCreatedAt() *timestamppb.Timestamp

func (*Public) GetData

func (x *Public) GetData() string

func (*Public) GetId

func (x *Public) GetId() string

func (*Public) GetType

func (x *Public) GetType() PublicType

func (*Public) GetUpdatedAt

func (x *Public) GetUpdatedAt() *timestamppb.Timestamp

func (*Public) GetUsername

func (x *Public) GetUsername() string

func (*Public) ProtoMessage

func (*Public) ProtoMessage()

func (*Public) ProtoReflect

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

func (*Public) Reset

func (x *Public) Reset()

func (*Public) String

func (x *Public) String() string

func (*Public) ToORM

func (m *Public) ToORM(ctx context.Context) (PublicORM, error)

ToORM runs the BeforeToORM hook if present, converts the fields of this object to ORM format, runs the AfterToORM hook, then returns the ORM object

type PublicORM

type PublicORM struct {
	Claims    string
	CoreId    *string
	CreatedAt *time.Time
	Data      string
	Id        string `gorm:"type:uuid;primary_key"`
	Type      int32
	UpdatedAt *time.Time
	Username  string
}

func (*PublicORM) BeforeCreate

func (public *PublicORM) BeforeCreate(tx *gorm.DB) (err error)

BeforeCreate - GORM-specific autogenerated helpers.

func (PublicORM) TableName

func (PublicORM) TableName() string

TableName overrides the default tablename generated by GORM

func (*PublicORM) ToPB

func (m *PublicORM) ToPB(ctx context.Context) (Public, error)

ToPB runs the BeforeToPB hook if present, converts the fields of this object to PB format, runs the AfterToPB hook, then returns the PB object

type PublicORMWithAfterCreate_

type PublicORMWithAfterCreate_ interface {
	AfterCreate_(context.Context, *gorm.DB) error
}

type PublicORMWithAfterDeleteSet

type PublicORMWithAfterDeleteSet interface {
	AfterDeleteSet(context.Context, []*Public, *gorm.DB) error
}

type PublicORMWithAfterDelete_

type PublicORMWithAfterDelete_ interface {
	AfterDelete_(context.Context, *gorm.DB) error
}

type PublicORMWithAfterListFind

type PublicORMWithAfterListFind interface {
	AfterListFind(context.Context, *gorm.DB, *[]PublicORM) error
}

type PublicORMWithAfterReadFind

type PublicORMWithAfterReadFind interface {
	AfterReadFind(context.Context, *gorm.DB) error
}

type PublicORMWithAfterStrictUpdateSave

type PublicORMWithAfterStrictUpdateSave interface {
	AfterStrictUpdateSave(context.Context, *gorm.DB) error
}

type PublicORMWithBeforeCreate_

type PublicORMWithBeforeCreate_ interface {
	BeforeCreate_(context.Context, *gorm.DB) (*gorm.DB, error)
}

type PublicORMWithBeforeDeleteSet

type PublicORMWithBeforeDeleteSet interface {
	BeforeDeleteSet(context.Context, []*Public, *gorm.DB) (*gorm.DB, error)
}

type PublicORMWithBeforeDelete_

type PublicORMWithBeforeDelete_ interface {
	BeforeDelete_(context.Context, *gorm.DB) (*gorm.DB, error)
}

type PublicORMWithBeforeListApplyQuery

type PublicORMWithBeforeListApplyQuery interface {
	BeforeListApplyQuery(context.Context, *gorm.DB) (*gorm.DB, error)
}

type PublicORMWithBeforeListFind

type PublicORMWithBeforeListFind interface {
	BeforeListFind(context.Context, *gorm.DB) (*gorm.DB, error)
}

type PublicORMWithBeforeReadApplyQuery

type PublicORMWithBeforeReadApplyQuery interface {
	BeforeReadApplyQuery(context.Context, *gorm.DB) (*gorm.DB, error)
}

type PublicORMWithBeforeReadFind

type PublicORMWithBeforeReadFind interface {
	BeforeReadFind(context.Context, *gorm.DB) (*gorm.DB, error)
}

type PublicORMWithBeforeStrictUpdateCleanup

type PublicORMWithBeforeStrictUpdateCleanup interface {
	BeforeStrictUpdateCleanup(context.Context, *gorm.DB) (*gorm.DB, error)
}

type PublicORMWithBeforeStrictUpdateSave

type PublicORMWithBeforeStrictUpdateSave interface {
	BeforeStrictUpdateSave(context.Context, *gorm.DB) (*gorm.DB, error)
}

type PublicType

type PublicType int32

PublicType - The type of a Public credential. Each of these types might trigger different validations when using fetching/creating Private in DB.

const (
	// A Username is the default type, such that if the Public.Username is
	// empty, the type will not be able to save itself in DB without
	// explicitely specifying either its .Username field, or by creating a
	// credential.BlankUsername type first.
	PublicType_Username      PublicType = 0
	PublicType_BlankUsername PublicType = 1
	// PublicKey - Some types of Public credentials are cryptographic public keys.
	// Regardless of their cyphers, algos and other tails, they are stored
	// in the .Key field of the credential.Public, and specialized "subtypes"
	// provide methods for manipulating the key, in/for various formats/purposes.
	// As well, various methods are provided to get cipher and fingerprints.
	PublicType_PublicKey PublicType = 3
	// Certificate - An x509 certificate that can contain additional information
	// to an (optional) key (a certificate needs a key for encryption, but can be
	// empty).
	PublicType_Certificate PublicType = 4
)

func (PublicType) Descriptor

func (PublicType) Descriptor() protoreflect.EnumDescriptor

func (PublicType) Enum

func (x PublicType) Enum() *PublicType

func (PublicType) EnumDescriptor deprecated

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

Deprecated: Use PublicType.Descriptor instead.

func (PublicType) Number

func (x PublicType) Number() protoreflect.EnumNumber

func (PublicType) String

func (x PublicType) String() string

func (PublicType) Type

type PublicWithAfterPatchSave

type PublicWithAfterPatchSave interface {
	AfterPatchSave(context.Context, *Public, *field_mask.FieldMask, *gorm.DB) error
}

type PublicWithAfterToORM

type PublicWithAfterToORM interface {
	AfterToORM(context.Context, *PublicORM) error
}

PublicAfterToORM called after default ToORM code

type PublicWithAfterToPB

type PublicWithAfterToPB interface {
	AfterToPB(context.Context, *Public) error
}

PublicAfterToPB called after default ToPB code

type PublicWithBeforePatchApplyFieldMask

type PublicWithBeforePatchApplyFieldMask interface {
	BeforePatchApplyFieldMask(context.Context, *Public, *field_mask.FieldMask, *gorm.DB) (*gorm.DB, error)
}

type PublicWithBeforePatchRead

type PublicWithBeforePatchRead interface {
	BeforePatchRead(context.Context, *Public, *field_mask.FieldMask, *gorm.DB) (*gorm.DB, error)
}

type PublicWithBeforePatchSave

type PublicWithBeforePatchSave interface {
	BeforePatchSave(context.Context, *Public, *field_mask.FieldMask, *gorm.DB) (*gorm.DB, error)
}

type PublicWithBeforeToORM

type PublicWithBeforeToORM interface {
	BeforeToORM(context.Context, *PublicORM) error
}

PublicBeforeToORM called before default ToORM code

type PublicWithBeforeToPB

type PublicWithBeforeToPB interface {
	BeforeToPB(context.Context, *Public) error
}

PublicBeforeToPB called before default ToPB code

type Realm

type Realm struct {
	Id string `protobuf:"bytes,1,opt,name=Id,proto3" json:"Id,omitempty"`
	// @gotags: display:"Created at" readonly:"true"
	CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=CreatedAt,proto3" json:"CreatedAt,omitempty" display:"Created at" readonly:"true"`
	// @gotags: display:"Updated at" readonly:"true"
	UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=UpdatedAt,proto3" json:"UpdatedAt,omitempty" display:"Updated at" readonly:"true"`
	// @gotags: display:"Key"
	Key string `protobuf:"bytes,10,opt,name=Key,proto3" json:"Key,omitempty" display:"Key"`
	// @gotags: display:"Value"
	Value string `protobuf:"bytes,11,opt,name=Value,proto3" json:"Value,omitempty" display:"Value"`
	// contains filtered or unexported fields
}

Realm - The realm in which a CredentialPublic can be used to authenticate or from which a CredentialPrivate was looted.

func DefaultApplyFieldMaskRealm

func DefaultApplyFieldMaskRealm(ctx context.Context, patchee *Realm, patcher *Realm, updateMask *field_mask.FieldMask, prefix string, db *gorm.DB) (*Realm, error)

DefaultApplyFieldMaskRealm patches an pbObject with patcher according to a field mask.

func DefaultCreateRealm

func DefaultCreateRealm(ctx context.Context, in *Realm, db *gorm.DB) (*Realm, error)

DefaultCreateRealm executes a basic gorm create call

func DefaultListRealm

func DefaultListRealm(ctx context.Context, db *gorm.DB) ([]*Realm, error)

DefaultListRealm executes a gorm list call

func DefaultPatchRealm

func DefaultPatchRealm(ctx context.Context, in *Realm, updateMask *field_mask.FieldMask, db *gorm.DB) (*Realm, error)

DefaultPatchRealm executes a basic gorm update call with patch behavior

func DefaultPatchSetRealm

func DefaultPatchSetRealm(ctx context.Context, objects []*Realm, updateMasks []*field_mask.FieldMask, db *gorm.DB) ([]*Realm, error)

DefaultPatchSetRealm executes a bulk gorm update call with patch behavior

func DefaultReadRealm

func DefaultReadRealm(ctx context.Context, in *Realm, db *gorm.DB) (*Realm, error)

func DefaultStrictUpdateRealm

func DefaultStrictUpdateRealm(ctx context.Context, in *Realm, db *gorm.DB) (*Realm, error)

DefaultStrictUpdateRealm clears / replaces / appends first level 1:many children and then executes a gorm update call

func (*Realm) Descriptor deprecated

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

Deprecated: Use Realm.ProtoReflect.Descriptor instead.

func (*Realm) GetCreatedAt

func (x *Realm) GetCreatedAt() *timestamppb.Timestamp

func (*Realm) GetId

func (x *Realm) GetId() string

func (*Realm) GetKey

func (x *Realm) GetKey() string

func (*Realm) GetUpdatedAt

func (x *Realm) GetUpdatedAt() *timestamppb.Timestamp

func (*Realm) GetValue

func (x *Realm) GetValue() string

func (*Realm) ProtoMessage

func (*Realm) ProtoMessage()

func (*Realm) ProtoReflect

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

func (*Realm) Reset

func (x *Realm) Reset()

func (*Realm) String

func (x *Realm) String() string

func (*Realm) ToORM

func (m *Realm) ToORM(ctx context.Context) (RealmORM, error)

ToORM runs the BeforeToORM hook if present, converts the fields of this object to ORM format, runs the AfterToORM hook, then returns the ORM object

type RealmORM

type RealmORM struct {
	CoreId    *string
	CreatedAt *time.Time
	Id        string `gorm:"type:uuid;primary_key"`
	Key       string
	UpdatedAt *time.Time
	Value     string
}

func (*RealmORM) BeforeCreate

func (realm *RealmORM) BeforeCreate(tx *gorm.DB) (err error)

BeforeCreate - GORM-specific autogenerated helpers.

func (RealmORM) TableName

func (RealmORM) TableName() string

TableName overrides the default tablename generated by GORM

func (*RealmORM) ToPB

func (m *RealmORM) ToPB(ctx context.Context) (Realm, error)

ToPB runs the BeforeToPB hook if present, converts the fields of this object to PB format, runs the AfterToPB hook, then returns the PB object

type RealmORMWithAfterCreate_

type RealmORMWithAfterCreate_ interface {
	AfterCreate_(context.Context, *gorm.DB) error
}

type RealmORMWithAfterDeleteSet

type RealmORMWithAfterDeleteSet interface {
	AfterDeleteSet(context.Context, []*Realm, *gorm.DB) error
}

type RealmORMWithAfterDelete_

type RealmORMWithAfterDelete_ interface {
	AfterDelete_(context.Context, *gorm.DB) error
}

type RealmORMWithAfterListFind

type RealmORMWithAfterListFind interface {
	AfterListFind(context.Context, *gorm.DB, *[]RealmORM) error
}

type RealmORMWithAfterReadFind

type RealmORMWithAfterReadFind interface {
	AfterReadFind(context.Context, *gorm.DB) error
}

type RealmORMWithAfterStrictUpdateSave

type RealmORMWithAfterStrictUpdateSave interface {
	AfterStrictUpdateSave(context.Context, *gorm.DB) error
}

type RealmORMWithBeforeCreate_

type RealmORMWithBeforeCreate_ interface {
	BeforeCreate_(context.Context, *gorm.DB) (*gorm.DB, error)
}

type RealmORMWithBeforeDeleteSet

type RealmORMWithBeforeDeleteSet interface {
	BeforeDeleteSet(context.Context, []*Realm, *gorm.DB) (*gorm.DB, error)
}

type RealmORMWithBeforeDelete_

type RealmORMWithBeforeDelete_ interface {
	BeforeDelete_(context.Context, *gorm.DB) (*gorm.DB, error)
}

type RealmORMWithBeforeListApplyQuery

type RealmORMWithBeforeListApplyQuery interface {
	BeforeListApplyQuery(context.Context, *gorm.DB) (*gorm.DB, error)
}

type RealmORMWithBeforeListFind

type RealmORMWithBeforeListFind interface {
	BeforeListFind(context.Context, *gorm.DB) (*gorm.DB, error)
}

type RealmORMWithBeforeReadApplyQuery

type RealmORMWithBeforeReadApplyQuery interface {
	BeforeReadApplyQuery(context.Context, *gorm.DB) (*gorm.DB, error)
}

type RealmORMWithBeforeReadFind

type RealmORMWithBeforeReadFind interface {
	BeforeReadFind(context.Context, *gorm.DB) (*gorm.DB, error)
}

type RealmORMWithBeforeStrictUpdateCleanup

type RealmORMWithBeforeStrictUpdateCleanup interface {
	BeforeStrictUpdateCleanup(context.Context, *gorm.DB) (*gorm.DB, error)
}

type RealmORMWithBeforeStrictUpdateSave

type RealmORMWithBeforeStrictUpdateSave interface {
	BeforeStrictUpdateSave(context.Context, *gorm.DB) (*gorm.DB, error)
}

type RealmWithAfterPatchSave

type RealmWithAfterPatchSave interface {
	AfterPatchSave(context.Context, *Realm, *field_mask.FieldMask, *gorm.DB) error
}

type RealmWithAfterToORM

type RealmWithAfterToORM interface {
	AfterToORM(context.Context, *RealmORM) error
}

RealmAfterToORM called after default ToORM code

type RealmWithAfterToPB

type RealmWithAfterToPB interface {
	AfterToPB(context.Context, *Realm) error
}

RealmAfterToPB called after default ToPB code

type RealmWithBeforePatchApplyFieldMask

type RealmWithBeforePatchApplyFieldMask interface {
	BeforePatchApplyFieldMask(context.Context, *Realm, *field_mask.FieldMask, *gorm.DB) (*gorm.DB, error)
}

type RealmWithBeforePatchRead

type RealmWithBeforePatchRead interface {
	BeforePatchRead(context.Context, *Realm, *field_mask.FieldMask, *gorm.DB) (*gorm.DB, error)
}

type RealmWithBeforePatchSave

type RealmWithBeforePatchSave interface {
	BeforePatchSave(context.Context, *Realm, *field_mask.FieldMask, *gorm.DB) (*gorm.DB, error)
}

type RealmWithBeforeToORM

type RealmWithBeforeToORM interface {
	BeforeToORM(context.Context, *RealmORM) error
}

RealmBeforeToORM called before default ToORM code

type RealmWithBeforeToPB

type RealmWithBeforeToPB interface {
	BeforeToPB(context.Context, *Realm) error
}

RealmBeforeToPB called before default ToPB code

Jump to

Keyboard shortcuts

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