pub struct EndpointSpec {Show 14 fields
pub method: HttpMethod,
pub path: String,
pub auth: Option<AuthRule>,
pub input: Option<Vec<String>>,
pub filters: Option<Vec<String>>,
pub search: Option<Vec<String>>,
pub pagination: Option<PaginationStyle>,
pub sort: Option<Vec<String>>,
pub cache: Option<CacheSpec>,
pub hooks: Option<Vec<String>>,
pub events: Option<Vec<String>>,
pub jobs: Option<Vec<String>>,
pub upload: Option<UploadSpec>,
pub soft_delete: bool,
}Expand description
Specification for a single endpoint in a resource.
Matches the YAML format:
list:
method: GET
path: /users
auth: [member, admin]
pagination: cursorFields§
§method: HttpMethodHTTP method (GET, POST, PATCH, PUT, DELETE).
path: StringURL path pattern (e.g., “/users”, “/users/:id”).
auth: Option<AuthRule>Authentication/authorization rule.
input: Option<Vec<String>>Fields accepted as input for create/update.
filters: Option<Vec<String>>Fields available as query filters.
search: Option<Vec<String>>Fields included in full-text search.
pagination: Option<PaginationStyle>Pagination style for list endpoints.
sort: Option<Vec<String>>Fields available for sorting.
cache: Option<CacheSpec>Cache configuration.
hooks: Option<Vec<String>>Hook function names to execute.
events: Option<Vec<String>>Events to emit after successful execution.
jobs: Option<Vec<String>>Background jobs to enqueue after successful execution.
upload: Option<UploadSpec>File upload configuration.
soft_delete: boolWhether this endpoint performs a soft delete.
Trait Implementations§
Source§impl Clone for EndpointSpec
impl Clone for EndpointSpec
Source§fn clone(&self) -> EndpointSpec
fn clone(&self) -> EndpointSpec
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EndpointSpec
impl Debug for EndpointSpec
Source§impl<'de> Deserialize<'de> for EndpointSpec
impl<'de> Deserialize<'de> for EndpointSpec
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for EndpointSpec
impl PartialEq for EndpointSpec
Source§impl Serialize for EndpointSpec
impl Serialize for EndpointSpec
impl StructuralPartialEq for EndpointSpec
Auto Trait Implementations§
impl Freeze for EndpointSpec
impl RefUnwindSafe for EndpointSpec
impl Send for EndpointSpec
impl Sync for EndpointSpec
impl Unpin for EndpointSpec
impl UnsafeUnpin for EndpointSpec
impl UnwindSafe for EndpointSpec
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more