-
-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathEnums.cs
More file actions
123 lines (114 loc) · 4.22 KB
/
Copy pathEnums.cs
File metadata and controls
123 lines (114 loc) · 4.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
namespace NpgsqlRest;
public enum RoutineType { Table, View, Function, Procedure, Other, SqlFile }
public enum CrudType { Select, Insert, Update, Delete }
public enum Method { GET, PUT, POST, DELETE }
public enum RequestParamType { QueryString, BodyJson }
public enum ParamType { QueryString, BodyJson, BodyParam, HeaderParam, PathParam }
public enum CommentHeader { None, Simple, Full }
public enum TextResponseNullHandling { EmptyString, NullLiteral, NoContent }
public enum QueryStringNullHandling { EmptyString, NullLiteral, Ignore }
public enum SslRequirement { Ignore, Warning, Required }
public enum PostgresNoticeLevels { INFO, NOTICE, WARNING }
public enum ServiceProviderObject
{
/// <summary>
/// Connection is not provided in service provider. Connection is supplied either by ConnectionString or by DataSource option.
/// </summary>
None,
/// <summary>
/// NpgsqlRest attempts to get NpgsqlDataSource from service provider (assuming one is provided).
/// </summary>
NpgsqlDataSource,
/// <summary>
/// NpgsqlRest attempts to get NpgsqlConnection from service provider (assuming one is provided).
/// </summary>
NpgsqlConnection
}
public enum CommentsMode
{
/// <summary>
/// Routine comments are ignored.
/// </summary>
Ignore,
/// <summary>
/// Creates all endpoints and parses comments for to configure endpoint meta data.
/// </summary>
ParseAll,
/// <summary>
/// Legacy alias of <see cref="OnlyAnnotated"/>, kept for back-compat. Behaves identically: an
/// endpoint is created when its comment has an HTTP tag OR a plugin requests an endpoint (e.g. `mcp`).
/// </summary>
OnlyWithHttpTag,
/// <summary>
/// Creates only endpoints whose comment opts the routine in via a recognized EXPOSURE tag — an
/// HTTP tag (HTTP endpoint) or a plugin annotation that requests an endpoint (e.g. `mcp`, which can
/// be HTTP+MCP, or MCP-only when combined with `internal`). Transport-agnostic. Modifier-only
/// comments (e.g. just `authorize`, `cached`, or `openapi hide` on a non-HTTP routine) create nothing.
/// </summary>
OnlyAnnotated
}
public enum RequestHeadersMode
{
/// <summary>
/// Ignore request headers, don't send them to PostgreSQL (default).
/// </summary>
Ignore,
/// <summary>
/// Send all request headers as json object to PostgreSQL by executing set_config('context.headers', headers, false) before routine call.
/// </summary>
Context,
/// <summary>
/// Send all request headers as json object to PostgreSQL as default routine parameter with name set by RequestHeadersParameterName option.
/// This parameter has to have the default value (null) in the routine and have to be text or json type.
/// </summary>
Parameter
}
public enum PostgresConnectionNoticeLoggingMode
{
/// <summary>
/// Log only connection messages.
/// </summary>
MessageOnly,
/// <summary>
/// Log last stack trace and message.
/// </summary>
FirstStackFrameAndMessage,
/// <summary>
/// Log full stack trace and message.
/// </summary>
FullStackAndMessage
}
public enum SseEventsScope
{
/// <summary>
/// All sessions with matching security context (RequiresAuthorization + AuthorizeRoles)
/// </summary>
Matching,
/// <summary>
/// All authorized sessions
/// </summary>
Authorize,
/// <summary>
/// All connected sessions regardless of authorization
/// </summary>
All
}
/// <summary>
/// Source of a value bound to a BeforeRoutineCommand parameter at request time.
/// </summary>
public enum BeforeRoutineCommandParameterSource
{
/// <summary>
/// Value comes from a user claim. Parameter Name is the claim type to look up on HttpContext.User.
/// Multi-value claims are joined the same way as ContextKeyClaimsMapping. Missing claims bind to NULL.
/// </summary>
Claim,
/// <summary>
/// Value comes from a request header. Parameter Name is the header name. Missing headers bind to NULL.
/// </summary>
RequestHeader,
/// <summary>
/// Value is the client IP address (uses the same resolution as IpAddressContextKey). Parameter Name is ignored.
/// </summary>
IpAddress
}