pgcrypto.go 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482
  1. // Code generated by sqlc-pg-gen. DO NOT EDIT.
  2. package contrib
  3. import (
  4. "github.com/sqlc-dev/sqlc/internal/sql/ast"
  5. "github.com/sqlc-dev/sqlc/internal/sql/catalog"
  6. )
  7. var funcsPgcrypto = []*catalog.Function{
  8. {
  9. Name: "armor",
  10. Args: []*catalog.Argument{
  11. {
  12. Type: &ast.TypeName{Name: "bytea"},
  13. },
  14. },
  15. ReturnType: &ast.TypeName{Name: "text"},
  16. },
  17. {
  18. Name: "armor",
  19. Args: []*catalog.Argument{
  20. {
  21. Type: &ast.TypeName{Name: "bytea"},
  22. },
  23. {
  24. Type: &ast.TypeName{Name: "text[]"},
  25. },
  26. {
  27. Type: &ast.TypeName{Name: "text[]"},
  28. },
  29. },
  30. ReturnType: &ast.TypeName{Name: "text"},
  31. },
  32. {
  33. Name: "crypt",
  34. Args: []*catalog.Argument{
  35. {
  36. Type: &ast.TypeName{Name: "text"},
  37. },
  38. {
  39. Type: &ast.TypeName{Name: "text"},
  40. },
  41. },
  42. ReturnType: &ast.TypeName{Name: "text"},
  43. },
  44. {
  45. Name: "dearmor",
  46. Args: []*catalog.Argument{
  47. {
  48. Type: &ast.TypeName{Name: "text"},
  49. },
  50. },
  51. ReturnType: &ast.TypeName{Name: "bytea"},
  52. },
  53. {
  54. Name: "decrypt",
  55. Args: []*catalog.Argument{
  56. {
  57. Type: &ast.TypeName{Name: "bytea"},
  58. },
  59. {
  60. Type: &ast.TypeName{Name: "bytea"},
  61. },
  62. {
  63. Type: &ast.TypeName{Name: "text"},
  64. },
  65. },
  66. ReturnType: &ast.TypeName{Name: "bytea"},
  67. },
  68. {
  69. Name: "decrypt_iv",
  70. Args: []*catalog.Argument{
  71. {
  72. Type: &ast.TypeName{Name: "bytea"},
  73. },
  74. {
  75. Type: &ast.TypeName{Name: "bytea"},
  76. },
  77. {
  78. Type: &ast.TypeName{Name: "bytea"},
  79. },
  80. {
  81. Type: &ast.TypeName{Name: "text"},
  82. },
  83. },
  84. ReturnType: &ast.TypeName{Name: "bytea"},
  85. },
  86. {
  87. Name: "digest",
  88. Args: []*catalog.Argument{
  89. {
  90. Type: &ast.TypeName{Name: "text"},
  91. },
  92. {
  93. Type: &ast.TypeName{Name: "text"},
  94. },
  95. },
  96. ReturnType: &ast.TypeName{Name: "bytea"},
  97. },
  98. {
  99. Name: "digest",
  100. Args: []*catalog.Argument{
  101. {
  102. Type: &ast.TypeName{Name: "bytea"},
  103. },
  104. {
  105. Type: &ast.TypeName{Name: "text"},
  106. },
  107. },
  108. ReturnType: &ast.TypeName{Name: "bytea"},
  109. },
  110. {
  111. Name: "encrypt",
  112. Args: []*catalog.Argument{
  113. {
  114. Type: &ast.TypeName{Name: "bytea"},
  115. },
  116. {
  117. Type: &ast.TypeName{Name: "bytea"},
  118. },
  119. {
  120. Type: &ast.TypeName{Name: "text"},
  121. },
  122. },
  123. ReturnType: &ast.TypeName{Name: "bytea"},
  124. },
  125. {
  126. Name: "encrypt_iv",
  127. Args: []*catalog.Argument{
  128. {
  129. Type: &ast.TypeName{Name: "bytea"},
  130. },
  131. {
  132. Type: &ast.TypeName{Name: "bytea"},
  133. },
  134. {
  135. Type: &ast.TypeName{Name: "bytea"},
  136. },
  137. {
  138. Type: &ast.TypeName{Name: "text"},
  139. },
  140. },
  141. ReturnType: &ast.TypeName{Name: "bytea"},
  142. },
  143. {
  144. Name: "gen_random_bytes",
  145. Args: []*catalog.Argument{
  146. {
  147. Type: &ast.TypeName{Name: "integer"},
  148. },
  149. },
  150. ReturnType: &ast.TypeName{Name: "bytea"},
  151. },
  152. {
  153. Name: "gen_salt",
  154. Args: []*catalog.Argument{
  155. {
  156. Type: &ast.TypeName{Name: "text"},
  157. },
  158. },
  159. ReturnType: &ast.TypeName{Name: "text"},
  160. },
  161. {
  162. Name: "gen_salt",
  163. Args: []*catalog.Argument{
  164. {
  165. Type: &ast.TypeName{Name: "text"},
  166. },
  167. {
  168. Type: &ast.TypeName{Name: "integer"},
  169. },
  170. },
  171. ReturnType: &ast.TypeName{Name: "text"},
  172. },
  173. {
  174. Name: "hmac",
  175. Args: []*catalog.Argument{
  176. {
  177. Type: &ast.TypeName{Name: "bytea"},
  178. },
  179. {
  180. Type: &ast.TypeName{Name: "bytea"},
  181. },
  182. {
  183. Type: &ast.TypeName{Name: "text"},
  184. },
  185. },
  186. ReturnType: &ast.TypeName{Name: "bytea"},
  187. },
  188. {
  189. Name: "hmac",
  190. Args: []*catalog.Argument{
  191. {
  192. Type: &ast.TypeName{Name: "text"},
  193. },
  194. {
  195. Type: &ast.TypeName{Name: "text"},
  196. },
  197. {
  198. Type: &ast.TypeName{Name: "text"},
  199. },
  200. },
  201. ReturnType: &ast.TypeName{Name: "bytea"},
  202. },
  203. {
  204. Name: "pgp_armor_headers",
  205. Args: []*catalog.Argument{
  206. {
  207. Type: &ast.TypeName{Name: "text"},
  208. },
  209. },
  210. ReturnType: &ast.TypeName{Name: "record"},
  211. },
  212. {
  213. Name: "pgp_key_id",
  214. Args: []*catalog.Argument{
  215. {
  216. Type: &ast.TypeName{Name: "bytea"},
  217. },
  218. },
  219. ReturnType: &ast.TypeName{Name: "text"},
  220. },
  221. {
  222. Name: "pgp_pub_decrypt",
  223. Args: []*catalog.Argument{
  224. {
  225. Type: &ast.TypeName{Name: "bytea"},
  226. },
  227. {
  228. Type: &ast.TypeName{Name: "bytea"},
  229. },
  230. },
  231. ReturnType: &ast.TypeName{Name: "text"},
  232. },
  233. {
  234. Name: "pgp_pub_decrypt",
  235. Args: []*catalog.Argument{
  236. {
  237. Type: &ast.TypeName{Name: "bytea"},
  238. },
  239. {
  240. Type: &ast.TypeName{Name: "bytea"},
  241. },
  242. {
  243. Type: &ast.TypeName{Name: "text"},
  244. },
  245. },
  246. ReturnType: &ast.TypeName{Name: "text"},
  247. },
  248. {
  249. Name: "pgp_pub_decrypt",
  250. Args: []*catalog.Argument{
  251. {
  252. Type: &ast.TypeName{Name: "bytea"},
  253. },
  254. {
  255. Type: &ast.TypeName{Name: "bytea"},
  256. },
  257. {
  258. Type: &ast.TypeName{Name: "text"},
  259. },
  260. {
  261. Type: &ast.TypeName{Name: "text"},
  262. },
  263. },
  264. ReturnType: &ast.TypeName{Name: "text"},
  265. },
  266. {
  267. Name: "pgp_pub_decrypt_bytea",
  268. Args: []*catalog.Argument{
  269. {
  270. Type: &ast.TypeName{Name: "bytea"},
  271. },
  272. {
  273. Type: &ast.TypeName{Name: "bytea"},
  274. },
  275. },
  276. ReturnType: &ast.TypeName{Name: "bytea"},
  277. },
  278. {
  279. Name: "pgp_pub_decrypt_bytea",
  280. Args: []*catalog.Argument{
  281. {
  282. Type: &ast.TypeName{Name: "bytea"},
  283. },
  284. {
  285. Type: &ast.TypeName{Name: "bytea"},
  286. },
  287. {
  288. Type: &ast.TypeName{Name: "text"},
  289. },
  290. },
  291. ReturnType: &ast.TypeName{Name: "bytea"},
  292. },
  293. {
  294. Name: "pgp_pub_decrypt_bytea",
  295. Args: []*catalog.Argument{
  296. {
  297. Type: &ast.TypeName{Name: "bytea"},
  298. },
  299. {
  300. Type: &ast.TypeName{Name: "bytea"},
  301. },
  302. {
  303. Type: &ast.TypeName{Name: "text"},
  304. },
  305. {
  306. Type: &ast.TypeName{Name: "text"},
  307. },
  308. },
  309. ReturnType: &ast.TypeName{Name: "bytea"},
  310. },
  311. {
  312. Name: "pgp_pub_encrypt",
  313. Args: []*catalog.Argument{
  314. {
  315. Type: &ast.TypeName{Name: "text"},
  316. },
  317. {
  318. Type: &ast.TypeName{Name: "bytea"},
  319. },
  320. },
  321. ReturnType: &ast.TypeName{Name: "bytea"},
  322. },
  323. {
  324. Name: "pgp_pub_encrypt",
  325. Args: []*catalog.Argument{
  326. {
  327. Type: &ast.TypeName{Name: "text"},
  328. },
  329. {
  330. Type: &ast.TypeName{Name: "bytea"},
  331. },
  332. {
  333. Type: &ast.TypeName{Name: "text"},
  334. },
  335. },
  336. ReturnType: &ast.TypeName{Name: "bytea"},
  337. },
  338. {
  339. Name: "pgp_pub_encrypt_bytea",
  340. Args: []*catalog.Argument{
  341. {
  342. Type: &ast.TypeName{Name: "bytea"},
  343. },
  344. {
  345. Type: &ast.TypeName{Name: "bytea"},
  346. },
  347. },
  348. ReturnType: &ast.TypeName{Name: "bytea"},
  349. },
  350. {
  351. Name: "pgp_pub_encrypt_bytea",
  352. Args: []*catalog.Argument{
  353. {
  354. Type: &ast.TypeName{Name: "bytea"},
  355. },
  356. {
  357. Type: &ast.TypeName{Name: "bytea"},
  358. },
  359. {
  360. Type: &ast.TypeName{Name: "text"},
  361. },
  362. },
  363. ReturnType: &ast.TypeName{Name: "bytea"},
  364. },
  365. {
  366. Name: "pgp_sym_decrypt",
  367. Args: []*catalog.Argument{
  368. {
  369. Type: &ast.TypeName{Name: "bytea"},
  370. },
  371. {
  372. Type: &ast.TypeName{Name: "text"},
  373. },
  374. },
  375. ReturnType: &ast.TypeName{Name: "text"},
  376. },
  377. {
  378. Name: "pgp_sym_decrypt",
  379. Args: []*catalog.Argument{
  380. {
  381. Type: &ast.TypeName{Name: "bytea"},
  382. },
  383. {
  384. Type: &ast.TypeName{Name: "text"},
  385. },
  386. {
  387. Type: &ast.TypeName{Name: "text"},
  388. },
  389. },
  390. ReturnType: &ast.TypeName{Name: "text"},
  391. },
  392. {
  393. Name: "pgp_sym_decrypt_bytea",
  394. Args: []*catalog.Argument{
  395. {
  396. Type: &ast.TypeName{Name: "bytea"},
  397. },
  398. {
  399. Type: &ast.TypeName{Name: "text"},
  400. },
  401. },
  402. ReturnType: &ast.TypeName{Name: "bytea"},
  403. },
  404. {
  405. Name: "pgp_sym_decrypt_bytea",
  406. Args: []*catalog.Argument{
  407. {
  408. Type: &ast.TypeName{Name: "bytea"},
  409. },
  410. {
  411. Type: &ast.TypeName{Name: "text"},
  412. },
  413. {
  414. Type: &ast.TypeName{Name: "text"},
  415. },
  416. },
  417. ReturnType: &ast.TypeName{Name: "bytea"},
  418. },
  419. {
  420. Name: "pgp_sym_encrypt",
  421. Args: []*catalog.Argument{
  422. {
  423. Type: &ast.TypeName{Name: "text"},
  424. },
  425. {
  426. Type: &ast.TypeName{Name: "text"},
  427. },
  428. },
  429. ReturnType: &ast.TypeName{Name: "bytea"},
  430. },
  431. {
  432. Name: "pgp_sym_encrypt",
  433. Args: []*catalog.Argument{
  434. {
  435. Type: &ast.TypeName{Name: "text"},
  436. },
  437. {
  438. Type: &ast.TypeName{Name: "text"},
  439. },
  440. {
  441. Type: &ast.TypeName{Name: "text"},
  442. },
  443. },
  444. ReturnType: &ast.TypeName{Name: "bytea"},
  445. },
  446. {
  447. Name: "pgp_sym_encrypt_bytea",
  448. Args: []*catalog.Argument{
  449. {
  450. Type: &ast.TypeName{Name: "bytea"},
  451. },
  452. {
  453. Type: &ast.TypeName{Name: "text"},
  454. },
  455. },
  456. ReturnType: &ast.TypeName{Name: "bytea"},
  457. },
  458. {
  459. Name: "pgp_sym_encrypt_bytea",
  460. Args: []*catalog.Argument{
  461. {
  462. Type: &ast.TypeName{Name: "bytea"},
  463. },
  464. {
  465. Type: &ast.TypeName{Name: "text"},
  466. },
  467. {
  468. Type: &ast.TypeName{Name: "text"},
  469. },
  470. },
  471. ReturnType: &ast.TypeName{Name: "bytea"},
  472. },
  473. }
  474. func Pgcrypto() *catalog.Schema {
  475. s := &catalog.Schema{Name: "pg_catalog"}
  476. s.Funcs = funcsPgcrypto
  477. return s
  478. }