v1

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	LookupEntityKeys_name = map[int32]string{
		0: "LOOKUP_ENTITY_KEY_UNSPECIFIED",
		1: "LOOKUP_ENTITY_KEY_ID",
		2: "LOOKUP_ENTITY_KEY_USERNAME",
		3: "LOOKUP_ENTITY_KEY_EMAIL",
	}
	LookupEntityKeys_value = map[string]int32{
		"LOOKUP_ENTITY_KEY_UNSPECIFIED": 0,
		"LOOKUP_ENTITY_KEY_ID":          1,
		"LOOKUP_ENTITY_KEY_USERNAME":    2,
		"LOOKUP_ENTITY_KEY_EMAIL":       3,
	}
)

Enum value maps for LookupEntityKeys.

View Source
var File_core_authentication_basic_v1_service_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Entity

type Entity struct {
	Id        string                 `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bun:"id" csv:"id" pg:"id" yaml:"id"`
	Username  string                 `protobuf:"bytes,2,opt,name=username,proto3" json:"username" bun:"username" csv:"username" pg:"username" yaml:"username"`
	Password  string                 `protobuf:"bytes,3,opt,name=password,proto3" json:"password" bun:"password" csv:"password" pg:"password" yaml:"password"`
	Email     string                 `protobuf:"bytes,4,opt,name=email,proto3" json:"email" bun:"email" csv:"email" pg:"email" yaml:"email"`
	CreatedAt *timestamppb.Timestamp `` /* 146-byte string literal not displayed */
	UpdatedAt *timestamppb.Timestamp `` /* 146-byte string literal not displayed */
	// contains filtered or unexported fields
}

Entity the basic representation of a user or actor operating in the system with fields for ID, username, password, email, and timestamps for creation and updates of the Entity values. A combination of these fields uniquely identifies an entity within the system and allows for authentication.

func (*Entity) Descriptor deprecated

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

Deprecated: Use Entity.ProtoReflect.Descriptor instead.

func (*Entity) GetCreatedAt

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

func (*Entity) GetEmail

func (x *Entity) GetEmail() string

func (*Entity) GetId

func (x *Entity) GetId() string

func (*Entity) GetPassword

func (x *Entity) GetPassword() string

func (*Entity) GetUpdatedAt

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

func (*Entity) GetUsername

func (x *Entity) GetUsername() string

func (*Entity) ProtoMessage

func (*Entity) ProtoMessage()

func (*Entity) ProtoReflect

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

func (*Entity) Reset

func (x *Entity) Reset()

func (*Entity) String

func (x *Entity) String() string

func (*Entity) Validate

func (m *Entity) Validate() error

Validate checks the field values on Entity with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*Entity) ValidateAll

func (m *Entity) ValidateAll() error

ValidateAll checks the field values on Entity with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in EntityMultiError, or nil if none found.

type EntityMultiError

type EntityMultiError []error

EntityMultiError is an error wrapping multiple validation errors returned by Entity.ValidateAll() if the designated constraints aren't met.

func (EntityMultiError) AllErrors

func (m EntityMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (EntityMultiError) Error

func (m EntityMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type EntityValidationError

type EntityValidationError struct {
	// contains filtered or unexported fields
}

EntityValidationError is the validation error returned by Entity.Validate if the designated constraints aren't met.

func (EntityValidationError) Cause

func (e EntityValidationError) Cause() error

Cause function returns cause value.

func (EntityValidationError) Error

func (e EntityValidationError) Error() string

Error satisfies the builtin error interface

func (EntityValidationError) ErrorName

func (e EntityValidationError) ErrorName() string

ErrorName returns error name.

func (EntityValidationError) Field

func (e EntityValidationError) Field() string

Field function returns field value.

func (EntityValidationError) Key

func (e EntityValidationError) Key() bool

Key function returns key value.

func (EntityValidationError) Reason

func (e EntityValidationError) Reason() string

Reason function returns reason value.

type LookupEntityKeys

type LookupEntityKeys int32

Valid keys for looking up an entity

const (
	LookupEntityKeys_LOOKUP_ENTITY_KEY_UNSPECIFIED LookupEntityKeys = 0
	LookupEntityKeys_LOOKUP_ENTITY_KEY_ID          LookupEntityKeys = 1
	LookupEntityKeys_LOOKUP_ENTITY_KEY_USERNAME    LookupEntityKeys = 2
	LookupEntityKeys_LOOKUP_ENTITY_KEY_EMAIL       LookupEntityKeys = 3
)

func (LookupEntityKeys) Descriptor

func (LookupEntityKeys) Enum

func (LookupEntityKeys) EnumDescriptor deprecated

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

Deprecated: Use LookupEntityKeys.Descriptor instead.

func (LookupEntityKeys) Number

func (LookupEntityKeys) String

func (x LookupEntityKeys) String() string

func (LookupEntityKeys) Type

type Session

type Session struct {
	Id           string                 `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bun:"id" csv:"id" pg:"id" yaml:"id"`
	UserId       string                 `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id" bun:"user_id" csv:"user_id" pg:"user_id" yaml:"user_id"`
	Token        string                 `protobuf:"bytes,3,opt,name=token,proto3" json:"token" bun:"token" csv:"token" pg:"token" yaml:"token"`
	RefreshToken string                 `` /* 167-byte string literal not displayed */
	CreatedAt    *timestamppb.Timestamp `` /* 146-byte string literal not displayed */
	ExpiresAt    *timestamppb.Timestamp `` /* 146-byte string literal not displayed */
	// contains filtered or unexported fields
}

Session is time bound authentication token that is issued to a user upon successful login. It contains the user ID, a unique token, and timestamps for when the session was created and when it expires. The token is used to authenticate the user in subsequent requests, allowing them to access protected resources without needing to re-enter their credentials.

func (*Session) Descriptor deprecated

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

Deprecated: Use Session.ProtoReflect.Descriptor instead.

func (*Session) GetCreatedAt

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

func (*Session) GetExpiresAt

func (x *Session) GetExpiresAt() *timestamppb.Timestamp

func (*Session) GetId

func (x *Session) GetId() string

func (*Session) GetRefreshToken

func (x *Session) GetRefreshToken() string

func (*Session) GetToken

func (x *Session) GetToken() string

func (*Session) GetUserId

func (x *Session) GetUserId() string

func (*Session) ProtoMessage

func (*Session) ProtoMessage()

func (*Session) ProtoReflect

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

func (*Session) Reset

func (x *Session) Reset()

func (*Session) String

func (x *Session) String() string

func (*Session) Validate

func (m *Session) Validate() error

Validate checks the field values on Session with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*Session) ValidateAll

func (m *Session) ValidateAll() error

ValidateAll checks the field values on Session with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in SessionMultiError, or nil if none found.

type SessionMultiError

type SessionMultiError []error

SessionMultiError is an error wrapping multiple validation errors returned by Session.ValidateAll() if the designated constraints aren't met.

func (SessionMultiError) AllErrors

func (m SessionMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (SessionMultiError) Error

func (m SessionMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type SessionValidationError

type SessionValidationError struct {
	// contains filtered or unexported fields
}

SessionValidationError is the validation error returned by Session.Validate if the designated constraints aren't met.

func (SessionValidationError) Cause

func (e SessionValidationError) Cause() error

Cause function returns cause value.

func (SessionValidationError) Error

func (e SessionValidationError) Error() string

Error satisfies the builtin error interface

func (SessionValidationError) ErrorName

func (e SessionValidationError) ErrorName() string

ErrorName returns error name.

func (SessionValidationError) Field

func (e SessionValidationError) Field() string

Field function returns field value.

func (SessionValidationError) Key

func (e SessionValidationError) Key() bool

Key function returns key value.

func (SessionValidationError) Reason

func (e SessionValidationError) Reason() string

Reason function returns reason value.

Jump to

Keyboard shortcuts

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