Documentation
¶
Index ¶
- Variables
- type CacheConfig
- func (*CacheConfig) Descriptor() ([]byte, []int)deprecated
- func (x *CacheConfig) GetCleanupInterval() int64
- func (x *CacheConfig) GetCustomize() *structpb.Struct
- func (x *CacheConfig) GetDriver() string
- func (x *CacheConfig) GetMemcached() *MemcachedConfig
- func (x *CacheConfig) GetMemory() *MemoryConfig
- func (x *CacheConfig) GetName() string
- func (x *CacheConfig) GetRedis() *RedisConfig
- func (*CacheConfig) ProtoMessage()
- func (x *CacheConfig) ProtoReflect() protoreflect.Message
- func (x *CacheConfig) Reset()
- func (x *CacheConfig) String() string
- func (m *CacheConfig) Validate() error
- func (m *CacheConfig) ValidateAll() error
- type CacheConfigMultiError
- type CacheConfigValidationError
- func (e CacheConfigValidationError) Cause() error
- func (e CacheConfigValidationError) Error() string
- func (e CacheConfigValidationError) ErrorName() string
- func (e CacheConfigValidationError) Field() string
- func (e CacheConfigValidationError) Key() bool
- func (e CacheConfigValidationError) Reason() string
- type MemcachedConfig
- func (*MemcachedConfig) Descriptor() ([]byte, []int)deprecated
- func (x *MemcachedConfig) GetAddr() string
- func (x *MemcachedConfig) GetMaxIdle() int32
- func (x *MemcachedConfig) GetPassword() string
- func (x *MemcachedConfig) GetTimeout() int64
- func (x *MemcachedConfig) GetUsername() string
- func (*MemcachedConfig) ProtoMessage()
- func (x *MemcachedConfig) ProtoReflect() protoreflect.Message
- func (x *MemcachedConfig) Reset()
- func (x *MemcachedConfig) String() string
- func (m *MemcachedConfig) Validate() error
- func (m *MemcachedConfig) ValidateAll() error
- type MemcachedConfigMultiError
- type MemcachedConfigValidationError
- func (e MemcachedConfigValidationError) Cause() error
- func (e MemcachedConfigValidationError) Error() string
- func (e MemcachedConfigValidationError) ErrorName() string
- func (e MemcachedConfigValidationError) Field() string
- func (e MemcachedConfigValidationError) Key() bool
- func (e MemcachedConfigValidationError) Reason() string
- type MemoryConfig
- func (*MemoryConfig) Descriptor() ([]byte, []int)deprecated
- func (x *MemoryConfig) GetCapacity() int32
- func (x *MemoryConfig) GetCleanupInterval() int64
- func (x *MemoryConfig) GetExpiration() int64
- func (x *MemoryConfig) GetSize() int32
- func (*MemoryConfig) ProtoMessage()
- func (x *MemoryConfig) ProtoReflect() protoreflect.Message
- func (x *MemoryConfig) Reset()
- func (x *MemoryConfig) String() string
- func (m *MemoryConfig) Validate() error
- func (m *MemoryConfig) ValidateAll() error
- type MemoryConfigMultiError
- type MemoryConfigValidationError
- func (e MemoryConfigValidationError) Cause() error
- func (e MemoryConfigValidationError) Error() string
- func (e MemoryConfigValidationError) ErrorName() string
- func (e MemoryConfigValidationError) Field() string
- func (e MemoryConfigValidationError) Key() bool
- func (e MemoryConfigValidationError) Reason() string
- type RedisConfig
- func (*RedisConfig) Descriptor() ([]byte, []int)deprecated
- func (x *RedisConfig) GetAddr() string
- func (x *RedisConfig) GetDb() int32
- func (x *RedisConfig) GetDialTimeout() int64
- func (x *RedisConfig) GetIdleTimeout() int64
- func (x *RedisConfig) GetMinIdleConns() int32
- func (x *RedisConfig) GetNetwork() string
- func (x *RedisConfig) GetPassword() string
- func (x *RedisConfig) GetPoolSize() int32
- func (x *RedisConfig) GetPoolTimeout() int64
- func (x *RedisConfig) GetReadTimeout() int64
- func (x *RedisConfig) GetTlsCaCertFile() string
- func (x *RedisConfig) GetTlsClientCertFile() string
- func (x *RedisConfig) GetTlsClientKeyFile() string
- func (x *RedisConfig) GetTlsEnabled() bool
- func (x *RedisConfig) GetTlsInsecureSkipVerify() bool
- func (x *RedisConfig) GetWriteTimeout() int64
- func (*RedisConfig) ProtoMessage()
- func (x *RedisConfig) ProtoReflect() protoreflect.Message
- func (x *RedisConfig) Reset()
- func (x *RedisConfig) String() string
- func (m *RedisConfig) Validate() error
- func (m *RedisConfig) ValidateAll() error
- type RedisConfigMultiError
- type RedisConfigValidationError
- func (e RedisConfigValidationError) Cause() error
- func (e RedisConfigValidationError) Error() string
- func (e RedisConfigValidationError) ErrorName() string
- func (e RedisConfigValidationError) Field() string
- func (e RedisConfigValidationError) Key() bool
- func (e RedisConfigValidationError) Reason() string
Constants ¶
This section is empty.
Variables ¶
var File_config_data_cache_v1_cache_proto protoreflect.FileDescriptor
var File_config_data_cache_v1_memcached_proto protoreflect.FileDescriptor
var File_config_data_cache_v1_memory_proto protoreflect.FileDescriptor
var File_config_data_cache_v1_redis_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type CacheConfig ¶
type CacheConfig struct {
// The 'driver' field determines which configuration block to use.
// For built-in drivers, specify "redis", "memcached", or "memory".
// For custom drivers, specify the registered name of the custom driver.
// When a custom driver is used, its configuration should be placed in the 'customize' field.
Driver string `protobuf:"bytes,1,opt,name=driver,proto3" json:"driver,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
// Memcached
Memcached *MemcachedConfig `protobuf:"bytes,10,opt,name=memcached,proto3" json:"memcached,omitempty"`
// Memory cache
Memory *MemoryConfig `protobuf:"bytes,11,opt,name=memory,proto3" json:"memory,omitempty"`
// Redis
Redis *RedisConfig `protobuf:"bytes,12,opt,name=redis,proto3" json:"redis,omitempty"`
// Cleanup interval for memory cache in seconds.
// If 0 or not set, a default (e.g., 5 minutes) will be used by the implementation.
CleanupInterval int64 `protobuf:"varint,13,opt,name=cleanup_interval,proto3" json:"cleanup_interval,omitempty"`
// Optional custom configuration for cache types not explicitly defined.
Customize *structpb.Struct `protobuf:"bytes,14,opt,name=customize,proto3,oneof" json:"customize,omitempty"`
// contains filtered or unexported fields
}
CacheConfig defines the configuration for various caching mechanisms. This message was extracted from storage.proto and renamed for consistency.
func (*CacheConfig) Descriptor
deprecated
func (*CacheConfig) Descriptor() ([]byte, []int)
Deprecated: Use CacheConfig.ProtoReflect.Descriptor instead.
func (*CacheConfig) GetCleanupInterval ¶
func (x *CacheConfig) GetCleanupInterval() int64
func (*CacheConfig) GetCustomize ¶
func (x *CacheConfig) GetCustomize() *structpb.Struct
func (*CacheConfig) GetDriver ¶
func (x *CacheConfig) GetDriver() string
func (*CacheConfig) GetMemcached ¶
func (x *CacheConfig) GetMemcached() *MemcachedConfig
func (*CacheConfig) GetMemory ¶
func (x *CacheConfig) GetMemory() *MemoryConfig
func (*CacheConfig) GetName ¶
func (x *CacheConfig) GetName() string
func (*CacheConfig) GetRedis ¶
func (x *CacheConfig) GetRedis() *RedisConfig
func (*CacheConfig) ProtoMessage ¶
func (*CacheConfig) ProtoMessage()
func (*CacheConfig) ProtoReflect ¶
func (x *CacheConfig) ProtoReflect() protoreflect.Message
func (*CacheConfig) Reset ¶
func (x *CacheConfig) Reset()
func (*CacheConfig) String ¶
func (x *CacheConfig) String() string
func (*CacheConfig) Validate ¶
func (m *CacheConfig) Validate() error
Validate checks the field values on CacheConfig 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 (*CacheConfig) ValidateAll ¶
func (m *CacheConfig) ValidateAll() error
ValidateAll checks the field values on CacheConfig 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 CacheConfigMultiError, or nil if none found.
type CacheConfigMultiError ¶
type CacheConfigMultiError []error
CacheConfigMultiError is an error wrapping multiple validation errors returned by CacheConfig.ValidateAll() if the designated constraints aren't met.
func (CacheConfigMultiError) AllErrors ¶
func (m CacheConfigMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (CacheConfigMultiError) Error ¶
func (m CacheConfigMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type CacheConfigValidationError ¶
type CacheConfigValidationError struct {
// contains filtered or unexported fields
}
CacheConfigValidationError is the validation error returned by CacheConfig.Validate if the designated constraints aren't met.
func (CacheConfigValidationError) Cause ¶
func (e CacheConfigValidationError) Cause() error
Cause function returns cause value.
func (CacheConfigValidationError) Error ¶
func (e CacheConfigValidationError) Error() string
Error satisfies the builtin error interface
func (CacheConfigValidationError) ErrorName ¶
func (e CacheConfigValidationError) ErrorName() string
ErrorName returns error name.
func (CacheConfigValidationError) Field ¶
func (e CacheConfigValidationError) Field() string
Field function returns field value.
func (CacheConfigValidationError) Key ¶
func (e CacheConfigValidationError) Key() bool
Key function returns key value.
func (CacheConfigValidationError) Reason ¶
func (e CacheConfigValidationError) Reason() string
Reason function returns reason value.
type MemcachedConfig ¶
type MemcachedConfig struct {
Addr string `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"`
Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"`
MaxIdle int32 `protobuf:"varint,4,opt,name=max_idle,proto3" json:"max_idle,omitempty"`
Timeout int64 `protobuf:"varint,5,opt,name=timeout,proto3" json:"timeout,omitempty"`
// contains filtered or unexported fields
}
MemcachedConfig defines the configuration for a Memcached client. This message was extracted from storage.proto and renamed for consistency.
func (*MemcachedConfig) Descriptor
deprecated
func (*MemcachedConfig) Descriptor() ([]byte, []int)
Deprecated: Use MemcachedConfig.ProtoReflect.Descriptor instead.
func (*MemcachedConfig) GetAddr ¶
func (x *MemcachedConfig) GetAddr() string
func (*MemcachedConfig) GetMaxIdle ¶
func (x *MemcachedConfig) GetMaxIdle() int32
func (*MemcachedConfig) GetPassword ¶
func (x *MemcachedConfig) GetPassword() string
func (*MemcachedConfig) GetTimeout ¶
func (x *MemcachedConfig) GetTimeout() int64
func (*MemcachedConfig) GetUsername ¶
func (x *MemcachedConfig) GetUsername() string
func (*MemcachedConfig) ProtoMessage ¶
func (*MemcachedConfig) ProtoMessage()
func (*MemcachedConfig) ProtoReflect ¶
func (x *MemcachedConfig) ProtoReflect() protoreflect.Message
func (*MemcachedConfig) Reset ¶
func (x *MemcachedConfig) Reset()
func (*MemcachedConfig) String ¶
func (x *MemcachedConfig) String() string
func (*MemcachedConfig) Validate ¶
func (m *MemcachedConfig) Validate() error
Validate checks the field values on MemcachedConfig 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 (*MemcachedConfig) ValidateAll ¶
func (m *MemcachedConfig) ValidateAll() error
ValidateAll checks the field values on MemcachedConfig 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 MemcachedConfigMultiError, or nil if none found.
type MemcachedConfigMultiError ¶
type MemcachedConfigMultiError []error
MemcachedConfigMultiError is an error wrapping multiple validation errors returned by MemcachedConfig.ValidateAll() if the designated constraints aren't met.
func (MemcachedConfigMultiError) AllErrors ¶
func (m MemcachedConfigMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (MemcachedConfigMultiError) Error ¶
func (m MemcachedConfigMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type MemcachedConfigValidationError ¶
type MemcachedConfigValidationError struct {
// contains filtered or unexported fields
}
MemcachedConfigValidationError is the validation error returned by MemcachedConfig.Validate if the designated constraints aren't met.
func (MemcachedConfigValidationError) Cause ¶
func (e MemcachedConfigValidationError) Cause() error
Cause function returns cause value.
func (MemcachedConfigValidationError) Error ¶
func (e MemcachedConfigValidationError) Error() string
Error satisfies the builtin error interface
func (MemcachedConfigValidationError) ErrorName ¶
func (e MemcachedConfigValidationError) ErrorName() string
ErrorName returns error name.
func (MemcachedConfigValidationError) Field ¶
func (e MemcachedConfigValidationError) Field() string
Field function returns field value.
func (MemcachedConfigValidationError) Key ¶
func (e MemcachedConfigValidationError) Key() bool
Key function returns key value.
func (MemcachedConfigValidationError) Reason ¶
func (e MemcachedConfigValidationError) Reason() string
Reason function returns reason value.
type MemoryConfig ¶
type MemoryConfig struct {
Size int32 `protobuf:"varint,1,opt,name=size,proto3" json:"size,omitempty"`
Capacity int32 `protobuf:"varint,2,opt,name=capacity,proto3" json:"capacity,omitempty"`
Expiration int64 `protobuf:"varint,3,opt,name=expiration,proto3" json:"expiration,omitempty"`
CleanupInterval int64 `protobuf:"varint,4,opt,name=cleanup_interval,proto3" json:"cleanup_interval,omitempty"`
// contains filtered or unexported fields
}
MemoryConfig defines the configuration for an in-memory cache. This message was extracted from storage.proto and renamed for consistency.
func (*MemoryConfig) Descriptor
deprecated
func (*MemoryConfig) Descriptor() ([]byte, []int)
Deprecated: Use MemoryConfig.ProtoReflect.Descriptor instead.
func (*MemoryConfig) GetCapacity ¶
func (x *MemoryConfig) GetCapacity() int32
func (*MemoryConfig) GetCleanupInterval ¶
func (x *MemoryConfig) GetCleanupInterval() int64
func (*MemoryConfig) GetExpiration ¶
func (x *MemoryConfig) GetExpiration() int64
func (*MemoryConfig) GetSize ¶
func (x *MemoryConfig) GetSize() int32
func (*MemoryConfig) ProtoMessage ¶
func (*MemoryConfig) ProtoMessage()
func (*MemoryConfig) ProtoReflect ¶
func (x *MemoryConfig) ProtoReflect() protoreflect.Message
func (*MemoryConfig) Reset ¶
func (x *MemoryConfig) Reset()
func (*MemoryConfig) String ¶
func (x *MemoryConfig) String() string
func (*MemoryConfig) Validate ¶
func (m *MemoryConfig) Validate() error
Validate checks the field values on MemoryConfig 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 (*MemoryConfig) ValidateAll ¶
func (m *MemoryConfig) ValidateAll() error
ValidateAll checks the field values on MemoryConfig 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 MemoryConfigMultiError, or nil if none found.
type MemoryConfigMultiError ¶
type MemoryConfigMultiError []error
MemoryConfigMultiError is an error wrapping multiple validation errors returned by MemoryConfig.ValidateAll() if the designated constraints aren't met.
func (MemoryConfigMultiError) AllErrors ¶
func (m MemoryConfigMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (MemoryConfigMultiError) Error ¶
func (m MemoryConfigMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type MemoryConfigValidationError ¶
type MemoryConfigValidationError struct {
// contains filtered or unexported fields
}
MemoryConfigValidationError is the validation error returned by MemoryConfig.Validate if the designated constraints aren't met.
func (MemoryConfigValidationError) Cause ¶
func (e MemoryConfigValidationError) Cause() error
Cause function returns cause value.
func (MemoryConfigValidationError) Error ¶
func (e MemoryConfigValidationError) Error() string
Error satisfies the builtin error interface
func (MemoryConfigValidationError) ErrorName ¶
func (e MemoryConfigValidationError) ErrorName() string
ErrorName returns error name.
func (MemoryConfigValidationError) Field ¶
func (e MemoryConfigValidationError) Field() string
Field function returns field value.
func (MemoryConfigValidationError) Key ¶
func (e MemoryConfigValidationError) Key() bool
Key function returns key value.
func (MemoryConfigValidationError) Reason ¶
func (e MemoryConfigValidationError) Reason() string
Reason function returns reason value.
type RedisConfig ¶
type RedisConfig struct {
Network string `protobuf:"bytes,1,opt,name=network,proto3" json:"network,omitempty"`
Addr string `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"`
Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"`
Db int32 `protobuf:"varint,4,opt,name=db,proto3" json:"db,omitempty"`
DialTimeout int64 `protobuf:"varint,5,opt,name=dial_timeout,proto3" json:"dial_timeout,omitempty"`
ReadTimeout int64 `protobuf:"varint,6,opt,name=read_timeout,proto3" json:"read_timeout,omitempty"`
WriteTimeout int64 `protobuf:"varint,7,opt,name=write_timeout,proto3" json:"write_timeout,omitempty"`
// Maximum number of connections in the connection pool.
PoolSize *int32 `protobuf:"varint,8,opt,name=pool_size,proto3,oneof" json:"pool_size,omitempty"`
// Minimum number of idle connections in the connection pool.
MinIdleConns *int32 `protobuf:"varint,9,opt,name=min_idle_conns,proto3,oneof" json:"min_idle_conns,omitempty"`
// Maximum duration a connection can be idle before being closed.
IdleTimeout *int64 `protobuf:"varint,10,opt,name=idle_timeout,proto3,oneof" json:"idle_timeout,omitempty"`
// Maximum duration to wait for a connection from the pool.
PoolTimeout *int64 `protobuf:"varint,11,opt,name=pool_timeout,proto3,oneof" json:"pool_timeout,omitempty"`
// Whether to enable TLS.
TlsEnabled *bool `protobuf:"varint,12,opt,name=tls_enabled,proto3,oneof" json:"tls_enabled,omitempty"`
// Path to TLS client certificate file.
TlsClientCertFile *string `protobuf:"bytes,13,opt,name=tls_client_cert_file,proto3,oneof" json:"tls_client_cert_file,omitempty"`
// Path to TLS client key file.
TlsClientKeyFile *string `protobuf:"bytes,14,opt,name=tls_client_key_file,proto3,oneof" json:"tls_client_key_file,omitempty"`
// Path to TLS CA certificate file.
TlsCaCertFile *string `protobuf:"bytes,15,opt,name=tls_ca_cert_file,proto3,oneof" json:"tls_ca_cert_file,omitempty"`
// Whether to enable TLS insecure skip verify.
TlsInsecureSkipVerify *bool `protobuf:"varint,16,opt,name=tls_insecure_skip_verify,proto3,oneof" json:"tls_insecure_skip_verify,omitempty"`
// contains filtered or unexported fields
}
RedisConfig defines the configuration for a Redis client used as a data store (e.g., cache, key-value store).
func (*RedisConfig) Descriptor
deprecated
func (*RedisConfig) Descriptor() ([]byte, []int)
Deprecated: Use RedisConfig.ProtoReflect.Descriptor instead.
func (*RedisConfig) GetAddr ¶
func (x *RedisConfig) GetAddr() string
func (*RedisConfig) GetDb ¶
func (x *RedisConfig) GetDb() int32
func (*RedisConfig) GetDialTimeout ¶
func (x *RedisConfig) GetDialTimeout() int64
func (*RedisConfig) GetIdleTimeout ¶
func (x *RedisConfig) GetIdleTimeout() int64
func (*RedisConfig) GetMinIdleConns ¶
func (x *RedisConfig) GetMinIdleConns() int32
func (*RedisConfig) GetNetwork ¶
func (x *RedisConfig) GetNetwork() string
func (*RedisConfig) GetPassword ¶
func (x *RedisConfig) GetPassword() string
func (*RedisConfig) GetPoolSize ¶
func (x *RedisConfig) GetPoolSize() int32
func (*RedisConfig) GetPoolTimeout ¶
func (x *RedisConfig) GetPoolTimeout() int64
func (*RedisConfig) GetReadTimeout ¶
func (x *RedisConfig) GetReadTimeout() int64
func (*RedisConfig) GetTlsCaCertFile ¶
func (x *RedisConfig) GetTlsCaCertFile() string
func (*RedisConfig) GetTlsClientCertFile ¶
func (x *RedisConfig) GetTlsClientCertFile() string
func (*RedisConfig) GetTlsClientKeyFile ¶
func (x *RedisConfig) GetTlsClientKeyFile() string
func (*RedisConfig) GetTlsEnabled ¶
func (x *RedisConfig) GetTlsEnabled() bool
func (*RedisConfig) GetTlsInsecureSkipVerify ¶
func (x *RedisConfig) GetTlsInsecureSkipVerify() bool
func (*RedisConfig) GetWriteTimeout ¶
func (x *RedisConfig) GetWriteTimeout() int64
func (*RedisConfig) ProtoMessage ¶
func (*RedisConfig) ProtoMessage()
func (*RedisConfig) ProtoReflect ¶
func (x *RedisConfig) ProtoReflect() protoreflect.Message
func (*RedisConfig) Reset ¶
func (x *RedisConfig) Reset()
func (*RedisConfig) String ¶
func (x *RedisConfig) String() string
func (*RedisConfig) Validate ¶
func (m *RedisConfig) Validate() error
Validate checks the field values on RedisConfig 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 (*RedisConfig) ValidateAll ¶
func (m *RedisConfig) ValidateAll() error
ValidateAll checks the field values on RedisConfig 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 RedisConfigMultiError, or nil if none found.
type RedisConfigMultiError ¶
type RedisConfigMultiError []error
RedisConfigMultiError is an error wrapping multiple validation errors returned by RedisConfig.ValidateAll() if the designated constraints aren't met.
func (RedisConfigMultiError) AllErrors ¶
func (m RedisConfigMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (RedisConfigMultiError) Error ¶
func (m RedisConfigMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type RedisConfigValidationError ¶
type RedisConfigValidationError struct {
// contains filtered or unexported fields
}
RedisConfigValidationError is the validation error returned by RedisConfig.Validate if the designated constraints aren't met.
func (RedisConfigValidationError) Cause ¶
func (e RedisConfigValidationError) Cause() error
Cause function returns cause value.
func (RedisConfigValidationError) Error ¶
func (e RedisConfigValidationError) Error() string
Error satisfies the builtin error interface
func (RedisConfigValidationError) ErrorName ¶
func (e RedisConfigValidationError) ErrorName() string
ErrorName returns error name.
func (RedisConfigValidationError) Field ¶
func (e RedisConfigValidationError) Field() string
Field function returns field value.
func (RedisConfigValidationError) Key ¶
func (e RedisConfigValidationError) Key() bool
Key function returns key value.
func (RedisConfigValidationError) Reason ¶
func (e RedisConfigValidationError) Reason() string
Reason function returns reason value.