tlsfingerprintprofile.go 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. // Code generated by ent, DO NOT EDIT.
  2. package tlsfingerprintprofile
  3. import (
  4. "time"
  5. "entgo.io/ent/dialect/sql"
  6. )
  7. const (
  8. // Label holds the string label denoting the tlsfingerprintprofile type in the database.
  9. Label = "tls_fingerprint_profile"
  10. // FieldID holds the string denoting the id field in the database.
  11. FieldID = "id"
  12. // FieldCreatedAt holds the string denoting the created_at field in the database.
  13. FieldCreatedAt = "created_at"
  14. // FieldUpdatedAt holds the string denoting the updated_at field in the database.
  15. FieldUpdatedAt = "updated_at"
  16. // FieldName holds the string denoting the name field in the database.
  17. FieldName = "name"
  18. // FieldDescription holds the string denoting the description field in the database.
  19. FieldDescription = "description"
  20. // FieldEnableGrease holds the string denoting the enable_grease field in the database.
  21. FieldEnableGrease = "enable_grease"
  22. // FieldCipherSuites holds the string denoting the cipher_suites field in the database.
  23. FieldCipherSuites = "cipher_suites"
  24. // FieldCurves holds the string denoting the curves field in the database.
  25. FieldCurves = "curves"
  26. // FieldPointFormats holds the string denoting the point_formats field in the database.
  27. FieldPointFormats = "point_formats"
  28. // FieldSignatureAlgorithms holds the string denoting the signature_algorithms field in the database.
  29. FieldSignatureAlgorithms = "signature_algorithms"
  30. // FieldAlpnProtocols holds the string denoting the alpn_protocols field in the database.
  31. FieldAlpnProtocols = "alpn_protocols"
  32. // FieldSupportedVersions holds the string denoting the supported_versions field in the database.
  33. FieldSupportedVersions = "supported_versions"
  34. // FieldKeyShareGroups holds the string denoting the key_share_groups field in the database.
  35. FieldKeyShareGroups = "key_share_groups"
  36. // FieldPskModes holds the string denoting the psk_modes field in the database.
  37. FieldPskModes = "psk_modes"
  38. // FieldExtensions holds the string denoting the extensions field in the database.
  39. FieldExtensions = "extensions"
  40. // Table holds the table name of the tlsfingerprintprofile in the database.
  41. Table = "tls_fingerprint_profiles"
  42. )
  43. // Columns holds all SQL columns for tlsfingerprintprofile fields.
  44. var Columns = []string{
  45. FieldID,
  46. FieldCreatedAt,
  47. FieldUpdatedAt,
  48. FieldName,
  49. FieldDescription,
  50. FieldEnableGrease,
  51. FieldCipherSuites,
  52. FieldCurves,
  53. FieldPointFormats,
  54. FieldSignatureAlgorithms,
  55. FieldAlpnProtocols,
  56. FieldSupportedVersions,
  57. FieldKeyShareGroups,
  58. FieldPskModes,
  59. FieldExtensions,
  60. }
  61. // ValidColumn reports if the column name is valid (part of the table columns).
  62. func ValidColumn(column string) bool {
  63. for i := range Columns {
  64. if column == Columns[i] {
  65. return true
  66. }
  67. }
  68. return false
  69. }
  70. var (
  71. // DefaultCreatedAt holds the default value on creation for the "created_at" field.
  72. DefaultCreatedAt func() time.Time
  73. // DefaultUpdatedAt holds the default value on creation for the "updated_at" field.
  74. DefaultUpdatedAt func() time.Time
  75. // UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field.
  76. UpdateDefaultUpdatedAt func() time.Time
  77. // NameValidator is a validator for the "name" field. It is called by the builders before save.
  78. NameValidator func(string) error
  79. // DefaultEnableGrease holds the default value on creation for the "enable_grease" field.
  80. DefaultEnableGrease bool
  81. )
  82. // OrderOption defines the ordering options for the TLSFingerprintProfile queries.
  83. type OrderOption func(*sql.Selector)
  84. // ByID orders the results by the id field.
  85. func ByID(opts ...sql.OrderTermOption) OrderOption {
  86. return sql.OrderByField(FieldID, opts...).ToFunc()
  87. }
  88. // ByCreatedAt orders the results by the created_at field.
  89. func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
  90. return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
  91. }
  92. // ByUpdatedAt orders the results by the updated_at field.
  93. func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption {
  94. return sql.OrderByField(FieldUpdatedAt, opts...).ToFunc()
  95. }
  96. // ByName orders the results by the name field.
  97. func ByName(opts ...sql.OrderTermOption) OrderOption {
  98. return sql.OrderByField(FieldName, opts...).ToFunc()
  99. }
  100. // ByDescription orders the results by the description field.
  101. func ByDescription(opts ...sql.OrderTermOption) OrderOption {
  102. return sql.OrderByField(FieldDescription, opts...).ToFunc()
  103. }
  104. // ByEnableGrease orders the results by the enable_grease field.
  105. func ByEnableGrease(opts ...sql.OrderTermOption) OrderOption {
  106. return sql.OrderByField(FieldEnableGrease, opts...).ToFunc()
  107. }