class PlaceOS::Model::UserAuthLookup

Included Modules

Defined in:

models/user_auth_lookup.cr

Constant Summary

CALLBACKS = {before_save: [] of Nil, after_save: [] of Nil, before_create: [do self.created_at = self.updated_at = Time.utc end, :generate_id] of Nil, after_create: [] of Nil, before_update: [do self.updated_at = Time.utc end] of Nil, after_update: [] of Nil, before_destroy: [] of Nil, after_destroy: [] of Nil}
DEFAULTS = {created_at => -> do Time.utc end, updated_at => -> do Time.utc end} of Nil => Nil
FIELDS = {created_at => {klass: Time, converter: Time::EpochConverter, mass_assign: true, should_persist: true, tags: nil}, updated_at => {klass: Time, converter: Time::EpochConverter, mass_assign: true, should_persist: true, tags: nil}, uid => {klass: String, converter: nil, mass_assign: true, should_persist: true, tags: nil}, provider => {klass: String, converter: nil, mass_assign: true, should_persist: true, tags: nil}, user_id => {klass: String, converter: nil, mass_assign: true, should_persist: true, tags: {parent: "User", es_type: "keyword"}}, authority_id => {klass: String, converter: nil, mass_assign: true, should_persist: true, tags: {parent: "Authority", es_type: "keyword"}}, id => {klass: String, converter: nil, mass_assign: false, should_persist: true, tags: {es_type: "keyword"}}} of Nil => Nil
HAS_KEYS = [true]
LOCAL_FIELDS = {created_at => {klass: Time, converter: Time::EpochConverter, mass_assign: true, should_persist: true, tags: nil}, updated_at => {klass: Time, converter: Time::EpochConverter, mass_assign: true, should_persist: true, tags: nil}, uid => {klass: String, converter: nil, mass_assign: true, should_persist: true, tags: nil}, provider => {klass: String, converter: nil, mass_assign: true, should_persist: true, tags: nil}, user_id => {klass: String, converter: nil, mass_assign: true, should_persist: true, tags: {parent: "User", es_type: "keyword"}}, authority_id => {klass: String, converter: nil, mass_assign: true, should_persist: true, tags: {parent: "Authority", es_type: "keyword"}}} of Nil => Nil

Macro level constants

PERSIST = {created_at => {klass: Time, converter: Time::EpochConverter, mass_assign: true, should_persist: true, tags: nil}, updated_at => {klass: Time, converter: Time::EpochConverter, mass_assign: true, should_persist: true, tags: nil}, uid => {klass: String, converter: nil, mass_assign: true, should_persist: true, tags: nil}, provider => {klass: String, converter: nil, mass_assign: true, should_persist: true, tags: nil}, user_id => {klass: String, converter: nil, mass_assign: true, should_persist: true, tags: {parent: "User", es_type: "keyword"}}, authority_id => {klass: String, converter: nil, mass_assign: true, should_persist: true, tags: {parent: "Authority", es_type: "keyword"}}, id => {klass: String, converter: nil, mass_assign: false, should_persist: true, tags: {es_type: "keyword"}}} of Nil => Nil
SETTERS = {created_at => nil, updated_at => nil, uid => nil, provider => nil, user_id => nil, authority_id => nil} of Nil => Nil

Constructors

Class Method Summary

Instance Method Summary

Instance methods inherited from class PlaceOS::Model::ModelBase

after_create after_create, after_destroy after_destroy, after_save after_save, after_update after_update, apply_defaults apply_defaults, assign_attributes(id : String | Nil = nil)
assign_attributes(params : HTTP::Params | Hash(String, String) | Tuple(String, String))
assign_attributes
, attributes attributes, attributes_tuple attributes_tuple, before_create before_create, before_destroy before_destroy, before_save before_save, before_update before_update, persistent_attributes persistent_attributes, run_create_callbacks(&) run_create_callbacks, run_destroy_callbacks(&) run_destroy_callbacks, run_save_callbacks(&) run_save_callbacks, run_update_callbacks(&) run_update_callbacks

Class methods inherited from class PlaceOS::Model::ModelBase

attributes attributes

Constructor Detail

def self.from_trusted_yaml(string_or_io : String | IO) : self #

Process attributes must be called while constants are in scope


def self.new(__temp_1343 : YAML::ParseContext, __temp_1344 : YAML::Nodes::Node, _dummy : Nil, trusted = false) #

Process attributes must be called while constants are in scope


def self.new(__temp_1342 : JSON::PullParser, trusted = false) #

Process attributes must be called while constants are in scope


def self.new(ctx : YAML::ParseContext, node : YAML::Nodes::Node) #

Process attributes must be called while constants are in scope


def self.new(created_at : Time | Nil = nil, updated_at : Time | Nil = nil, uid : String | Nil = nil, provider : String | Nil = nil, user_id : String | Nil = nil, authority_id : String | Nil = nil, id : String | Nil = nil) #

Process attributes must be called while constants are in scope


def self.new(params : HTTP::Params | Hash(String, String) | Tuple(String, String)) #

Accept HTTP params


Class Method Detail

def self.attributes #

You may want a list of available attributes


def self.by_authority_id(id) #

Look up instances of this model dependent on the foreign key


[View source]
def self.by_user_id(id) #

Look up instances of this model dependent on the foreign key


[View source]
def self.elastic #

def self.from_trusted_json(json) #

Process attributes must be called while constants are in scope


def self.table_name #

Instance Method Detail

def __authority : Authority | Nil #

def __authority=(__authority : Authority | Nil) #

def __user : User | Nil #

def __user=(__user : User | Nil) #

def after_create #
Description copied from class PlaceOS::Model::ModelBase

Base class for all Engine models


[View source]
def after_destroy #
Description copied from class PlaceOS::Model::ModelBase

Base class for all Engine models


[View source]
def after_save #
Description copied from class PlaceOS::Model::ModelBase

Base class for all Engine models


[View source]
def after_update #
Description copied from class PlaceOS::Model::ModelBase

Base class for all Engine models


[View source]
def apply_defaults #

Generate code to apply default values


def assign_attributes(created_at : Time | Nil = nil, updated_at : Time | Nil = nil, uid : String | Nil = nil, provider : String | Nil = nil, user_id : String | Nil = nil, authority_id : String | Nil = nil, id : String | Nil = nil) #

Process attributes must be called while constants are in scope


def assign_attributes(params : HTTP::Params | Hash(String, String) | Tuple(String, String)) #

Accept HTTP params


def assign_attributes_from_json(json) #

Process attributes must be called while constants are in scope


def assign_attributes_from_trusted_json(json) #

Process attributes must be called while constants are in scope


def assign_attributes_from_trusted_yaml(yaml) #

Process attributes must be called while constants are in scope


def assign_attributes_from_yaml(yaml) #

Uses the YAML parser as JSON is valid YAML


def attributes #

Returns a Hash of all the attribute values


def attributes_tuple #

Returns a NamedTuple of all attribute values


def authority : Authority | Nil #

Retrieves the parent relationship


[View source]
def authority! : Authority #

[View source]
def authority=(parent : Authority) #

Sets the parent relationship


[View source]
def authority_id : String? #

Process attributes must be called while constants are in scope


def authority_id=(value : String | Nil) #

Process attributes must be called while constants are in scope


def authority_id_change #

Process attributes must be called while constants are in scope


def authority_id_changed? #

Process attributes must be called while constants are in scope


def authority_id_default : String | Nil #

Attribute default value


def authority_id_was : String? #

Process attributes must be called while constants are in scope


def authority_id_will_change! #

Process attributes must be called while constants are in scope


def before_create #
Description copied from class PlaceOS::Model::ModelBase

Base class for all Engine models


[View source]
def before_destroy #
Description copied from class PlaceOS::Model::ModelBase

Base class for all Engine models


[View source]
def before_save #
Description copied from class PlaceOS::Model::ModelBase

Base class for all Engine models


[View source]
def before_update #
Description copied from class PlaceOS::Model::ModelBase

Base class for all Engine models


[View source]
def changed? #

Process attributes must be called while constants are in scope


def changed_attributes #

Process attributes must be called while constants are in scope


def changed_json #

Process attributes must be called while constants are in scope


def changed_yaml #

Process attributes must be called while constants are in scope


def clear_changes_information #

Process attributes must be called while constants are in scope


def created_at : Time? #

Process attributes must be called while constants are in scope


def created_at=(value : Time | Nil) #

Override the map json


def created_at_change #

Process attributes must be called while constants are in scope


def created_at_changed? #

Process attributes must be called while constants are in scope


def created_at_default : Time | Nil #

Attribute default value


def created_at_was : Time? #

Process attributes must be called while constants are in scope


def created_at_will_change! #

Process attributes must be called while constants are in scope


def generate_id #

[View source]
def id : String? #

Process attributes must be called while constants are in scope


def id=(value : String | Nil) #

Process attributes must be called while constants are in scope


def id_change #

Process attributes must be called while constants are in scope


def id_changed? #

Process attributes must be called while constants are in scope


def id_was : String? #

Process attributes must be called while constants are in scope


def id_will_change! #

Process attributes must be called while constants are in scope


def persistent_attributes #

Returns a hash of all attributes that may be persisted


def provider : String? #

Process attributes must be called while constants are in scope


def provider=(value : String | Nil) #

Process attributes must be called while constants are in scope


def provider_change #

Process attributes must be called while constants are in scope


def provider_changed? #

Process attributes must be called while constants are in scope


def provider_default : String | Nil #

Attribute default value


[View source]
def provider_was : String? #

Process attributes must be called while constants are in scope


def provider_will_change! #

Process attributes must be called while constants are in scope


def reset_associations #

[View source]
def restore_attributes #

Process attributes must be called while constants are in scope


def run_create_callbacks(&) #

Wrap a block with callbacks for the appropriate crud operation


[View source]
def run_destroy_callbacks(&) #
Description copied from class PlaceOS::Model::ModelBase

Base class for all Engine models


[View source]
def run_save_callbacks(&) #
Description copied from class PlaceOS::Model::ModelBase

Base class for all Engine models


[View source]
def run_update_callbacks(&) #
Description copied from class PlaceOS::Model::ModelBase

Base class for all Engine models


[View source]
def table_name #

def to_json(json : JSON::Builder) #

Process attributes must be called while constants are in scope


def to_yaml(__temp_1376 : YAML::Nodes::Builder) #

Process attributes must be called while constants are in scope


def uid : String? #

Process attributes must be called while constants are in scope


def uid=(value : String | Nil) #

Process attributes must be called while constants are in scope


def uid_change #

Process attributes must be called while constants are in scope


def uid_changed? #

Process attributes must be called while constants are in scope


def uid_default : String | Nil #

Attribute default value


[View source]
def uid_was : String? #

Process attributes must be called while constants are in scope


def uid_will_change! #

Process attributes must be called while constants are in scope


def updated_at : Time? #

Process attributes must be called while constants are in scope


def updated_at=(value : Time | Nil) #

Process attributes must be called while constants are in scope


def updated_at_change #

Process attributes must be called while constants are in scope


def updated_at_changed? #

Process attributes must be called while constants are in scope


def updated_at_default : Time | Nil #

Attribute default value


def updated_at_was : Time? #

Process attributes must be called while constants are in scope


def updated_at_will_change! #

Process attributes must be called while constants are in scope


def user : User | Nil #

Retrieves the parent relationship


[View source]
def user! : User #

[View source]
def user=(parent : User) #

Sets the parent relationship


[View source]
def user_id : String? #

Process attributes must be called while constants are in scope


def user_id=(value : String | Nil) #

Process attributes must be called while constants are in scope


def user_id_change #

Process attributes must be called while constants are in scope


def user_id_changed? #

Process attributes must be called while constants are in scope


def user_id_default : String | Nil #

Attribute default value


def user_id_was : String? #

Process attributes must be called while constants are in scope


def user_id_will_change! #

Process attributes must be called while constants are in scope