Skip to main content

mz_pgwire_common/
lib.rs

1// Copyright Materialize, Inc. and contributors. All rights reserved.
2//
3// Use of this software is governed by the Business Source License
4// included in the LICENSE file.
5//
6// As of the Change Date specified in that file, in accordance with
7// the Business Source License, use of this software will be governed
8// by the Apache License, Version 2.0.
9
10//! Common PostgreSQL network ("wire") protocol logic.
11
12#![warn(clippy::as_conversions)]
13#![warn(unused_extern_crates)]
14
15mod codec;
16mod conn;
17mod format;
18mod message;
19mod severity;
20
21pub use codec::{
22    ACCEPT_SSL_ENCRYPTION, CodecError, Cursor, DecodeState, FORWARDED_STARTUP_PARAM_ALLOWANCE,
23    MAX_FORWARDED_STARTUP_FRAME_SIZE, MAX_PREAUTH_FRAME_SIZE, MAX_REQUEST_SIZE,
24    MAX_STARTUP_FRAME_SIZE, Pgbuf, REJECT_ENCRYPTION, decode_startup, input_err, parse_frame_len,
25};
26pub use conn::{
27    CONN_UUID_KEY, Conn, ConnectionCounter, ConnectionError, ConnectionHandle,
28    MZ_FORWARDED_FOR_KEY, UserMetadata,
29};
30pub use format::Format;
31pub use message::{
32    ChannelBinding, ErrorResponse, FrontendMessage, FrontendStartupMessage, GS2Header,
33    SASLClientFinalResponse, SASLInitialResponse, VERSION_3, VERSION_CANCEL, VERSION_GSSENC,
34    VERSION_SSL, VERSIONS,
35};
36pub use severity::Severity;