update(zero): zeroing project scope for conduit refactoring
This commit is contained in:
parent
d991992236
commit
ab340aebd7
227 changed files with 1 additions and 14586 deletions
|
@ -1,19 +0,0 @@
|
||||||
/// Support for doing something awesome.
|
|
||||||
///
|
|
||||||
/// More dartdocs go here.
|
|
||||||
library;
|
|
||||||
|
|
||||||
// Auth Contracts
|
|
||||||
export 'src/auth/access/authorizable.dart';
|
|
||||||
export 'src/auth/access/gate.dart';
|
|
||||||
export 'src/auth/middleware/authenticates_request.dart';
|
|
||||||
export 'src/auth/authenticatable.dart';
|
|
||||||
export 'src/auth/can_reset_password.dart';
|
|
||||||
export 'src/auth/factory.dart';
|
|
||||||
export 'src/auth/guard.dart';
|
|
||||||
export 'src/auth/must_verify_email.dart';
|
|
||||||
export 'src/auth/password_broker_factory.dart';
|
|
||||||
export 'src/auth/password_broker.dart';
|
|
||||||
export 'src/auth/stateful_guard.dart';
|
|
||||||
export 'src/auth/supports_basic_auth.dart';
|
|
||||||
export 'src/auth/user_provider.dart';
|
|
|
@ -1,12 +0,0 @@
|
||||||
/// Support for doing something awesome.
|
|
||||||
///
|
|
||||||
/// More dartdocs go here.
|
|
||||||
library;
|
|
||||||
|
|
||||||
// Broadcasting Contracts
|
|
||||||
export 'src/broadcasting/broadcaster.dart';
|
|
||||||
export 'src/broadcasting/factory.dart';
|
|
||||||
export 'src/broadcasting/has_broadcast_channel.dart';
|
|
||||||
export 'src/broadcasting/should_be_unique.dart';
|
|
||||||
export 'src/broadcasting/should_broadcast.dart';
|
|
||||||
export 'src/broadcasting/should_broadcast_now.dart';
|
|
|
@ -1,8 +0,0 @@
|
||||||
/// Support for doing something awesome.
|
|
||||||
///
|
|
||||||
/// More dartdocs go here.
|
|
||||||
library;
|
|
||||||
|
|
||||||
// Bus Contracts
|
|
||||||
export 'src/bus/dispatcher.dart';
|
|
||||||
export 'src/bus/queueing_dispatcher.dart';
|
|
|
@ -1,12 +0,0 @@
|
||||||
/// Support for doing something awesome.
|
|
||||||
///
|
|
||||||
/// More dartdocs go here.
|
|
||||||
library;
|
|
||||||
|
|
||||||
// Cache Contracts
|
|
||||||
export 'src/cache/factory.dart';
|
|
||||||
export 'src/cache/lock.dart';
|
|
||||||
export 'src/cache/lock_provider.dart';
|
|
||||||
export 'src/cache/lock_timeout_exception.dart';
|
|
||||||
export 'src/cache/repository.dart';
|
|
||||||
export 'src/cache/store.dart';
|
|
|
@ -1,7 +0,0 @@
|
||||||
/// Support for doing something awesome.
|
|
||||||
///
|
|
||||||
/// More dartdocs go here.
|
|
||||||
library;
|
|
||||||
|
|
||||||
// Config Contracts
|
|
||||||
export 'src/config/repository.dart';
|
|
|
@ -1,10 +0,0 @@
|
||||||
/// Support for doing something awesome.
|
|
||||||
///
|
|
||||||
/// More dartdocs go here.
|
|
||||||
library;
|
|
||||||
|
|
||||||
// Console Contracts
|
|
||||||
export 'src/console/application.dart';
|
|
||||||
export 'src/console/isolatable.dart';
|
|
||||||
export 'src/console/kernel.dart';
|
|
||||||
export 'src/console/prompts_for_missing_input.dart';
|
|
|
@ -1,10 +0,0 @@
|
||||||
/// Support for doing something awesome.
|
|
||||||
///
|
|
||||||
/// More dartdocs go here.
|
|
||||||
library;
|
|
||||||
|
|
||||||
// Container Contracts
|
|
||||||
export 'src/container/binding_resolution_exception.dart';
|
|
||||||
export 'src/container/circular_dependency_exception.dart';
|
|
||||||
export 'src/container/container.dart';
|
|
||||||
export 'src/container/contextual_binding_builder.dart';
|
|
|
@ -1,8 +0,0 @@
|
||||||
/// Support for doing something awesome.
|
|
||||||
///
|
|
||||||
/// More dartdocs go here.
|
|
||||||
library;
|
|
||||||
|
|
||||||
// Cookie Contract
|
|
||||||
export 'src/cookie/factory.dart';
|
|
||||||
export 'src/cookie/queueing_factory.dart';
|
|
|
@ -1,19 +0,0 @@
|
||||||
/// Support for doing something awesome.
|
|
||||||
///
|
|
||||||
/// More dartdocs go here.
|
|
||||||
library;
|
|
||||||
|
|
||||||
// Database Eloquent Contracts
|
|
||||||
export 'src/database/eloquent/builder.dart';
|
|
||||||
export 'src/database/eloquent/castable.dart';
|
|
||||||
export 'src/database/eloquent/casts_attributes.dart';
|
|
||||||
export 'src/database/eloquent/casts_inbound_attributes.dart';
|
|
||||||
export 'src/database/eloquent/deviates_castable_attributes.dart';
|
|
||||||
export 'src/database/eloquent/serializes_castable_attributes.dart';
|
|
||||||
export 'src/database/eloquent/supports_partial_relations.dart';
|
|
||||||
|
|
||||||
// Database Events Contracts
|
|
||||||
export 'src/database/events/migration_event.dart';
|
|
||||||
|
|
||||||
// Database Contracts
|
|
||||||
export 'src/database/model_identifier.dart';
|
|
|
@ -1,9 +0,0 @@
|
||||||
/// Support for doing something awesome.
|
|
||||||
///
|
|
||||||
/// More dartdocs go here.
|
|
||||||
library;
|
|
||||||
|
|
||||||
// Database Query Contracts
|
|
||||||
export 'src/database/query/builder.dart';
|
|
||||||
export 'src/database/query/condition_expression.dart';
|
|
||||||
export 'src/database/query/expression.dart';
|
|
|
@ -1,7 +0,0 @@
|
||||||
/// Support for doing something awesome.
|
|
||||||
///
|
|
||||||
/// More dartdocs go here.
|
|
||||||
library;
|
|
||||||
|
|
||||||
// Debug Contracts
|
|
||||||
export 'src/debug/exception_handler.dart';
|
|
|
@ -1,10 +0,0 @@
|
||||||
/// Support for doing something awesome.
|
|
||||||
///
|
|
||||||
/// More dartdocs go here.
|
|
||||||
library;
|
|
||||||
|
|
||||||
// Encryption Contracts
|
|
||||||
export 'src/encryption/decrypt_exception.dart';
|
|
||||||
export 'src/encryption/encrypt_exception.dart';
|
|
||||||
export 'src/encryption/encrypter.dart';
|
|
||||||
export 'src/encryption/string_encrypter.dart';
|
|
|
@ -1,9 +0,0 @@
|
||||||
/// Support for doing something awesome.
|
|
||||||
///
|
|
||||||
/// More dartdocs go here.
|
|
||||||
library;
|
|
||||||
|
|
||||||
// Events Contracts
|
|
||||||
export 'src/events/dispatcher.dart';
|
|
||||||
export 'src/events/should_dispatch_after_commit.dart';
|
|
||||||
export 'src/events/should_handle_events_after_commit.dart';
|
|
|
@ -1,11 +0,0 @@
|
||||||
/// Support for doing something awesome.
|
|
||||||
///
|
|
||||||
/// More dartdocs go here.
|
|
||||||
library;
|
|
||||||
|
|
||||||
// Filesystem Contracts
|
|
||||||
export 'src/filesystem/cloud.dart';
|
|
||||||
export 'src/filesystem/factory.dart';
|
|
||||||
export 'src/filesystem/file_not_found_exception.dart';
|
|
||||||
export 'src/filesystem/filesystem.dart';
|
|
||||||
export 'src/filesystem/lock_timeout_exception.dart';
|
|
|
@ -1,11 +0,0 @@
|
||||||
/// Support for doing something awesome.
|
|
||||||
///
|
|
||||||
/// More dartdocs go here.
|
|
||||||
library;
|
|
||||||
|
|
||||||
// Foundation Contracts
|
|
||||||
export 'src/foundation/application.dart';
|
|
||||||
export 'src/foundation/caches_configuration.dart';
|
|
||||||
export 'src/foundation/caches_routes.dart';
|
|
||||||
export 'src/foundation/exception_renderer.dart';
|
|
||||||
export 'src/foundation/maintenance_mode.dart';
|
|
|
@ -1,7 +0,0 @@
|
||||||
/// Support for doing something awesome.
|
|
||||||
///
|
|
||||||
/// More dartdocs go here.
|
|
||||||
library;
|
|
||||||
|
|
||||||
// Hashing Contracts
|
|
||||||
export 'src/hashing/hasher.dart';
|
|
|
@ -1,7 +0,0 @@
|
||||||
/// Support for doing something awesome.
|
|
||||||
///
|
|
||||||
/// More dartdocs go here.
|
|
||||||
library;
|
|
||||||
|
|
||||||
// Http Contracts
|
|
||||||
export 'src/http/kernel.dart';
|
|
|
@ -1,11 +0,0 @@
|
||||||
/// Support for doing something awesome.
|
|
||||||
///
|
|
||||||
/// More dartdocs go here.
|
|
||||||
library;
|
|
||||||
|
|
||||||
// Mail Contracts
|
|
||||||
export 'src/mail/attachable.dart';
|
|
||||||
export 'src/mail/factory.dart';
|
|
||||||
export 'src/mail/mail_queue.dart';
|
|
||||||
export 'src/mail/mailable.dart';
|
|
||||||
export 'src/mail/mailer.dart';
|
|
|
@ -1,8 +0,0 @@
|
||||||
/// Support for doing something awesome.
|
|
||||||
///
|
|
||||||
/// More dartdocs go here.
|
|
||||||
library;
|
|
||||||
|
|
||||||
// Notifications Contracts
|
|
||||||
export 'src/notifications/dispatcher.dart';
|
|
||||||
export 'src/notifications/factory.dart';
|
|
|
@ -1,9 +0,0 @@
|
||||||
/// Support for doing something awesome.
|
|
||||||
///
|
|
||||||
/// More dartdocs go here.
|
|
||||||
library;
|
|
||||||
|
|
||||||
// Pagination Contracts
|
|
||||||
export 'src/pagination/cursor_paginator.dart';
|
|
||||||
export 'src/pagination/length_aware_paginator.dart';
|
|
||||||
export 'src/pagination/paginator.dart';
|
|
|
@ -1,8 +0,0 @@
|
||||||
/// Support for doing something awesome.
|
|
||||||
///
|
|
||||||
/// More dartdocs go here.
|
|
||||||
library;
|
|
||||||
|
|
||||||
// Pipeline Contracts
|
|
||||||
export 'src/pipeline/hub.dart';
|
|
||||||
export 'src/pipeline/pipeline.dart';
|
|
|
@ -1,8 +0,0 @@
|
||||||
/// Support for doing something awesome.
|
|
||||||
///
|
|
||||||
/// More dartdocs go here.
|
|
||||||
library;
|
|
||||||
|
|
||||||
// Process Contracts
|
|
||||||
export 'src/process/invoked_process.dart';
|
|
||||||
export 'src/process/process_result.dart';
|
|
|
@ -1,20 +0,0 @@
|
||||||
/// Support for doing something awesome.
|
|
||||||
///
|
|
||||||
/// More dartdocs go here.
|
|
||||||
library;
|
|
||||||
|
|
||||||
// Queue Contracts
|
|
||||||
export 'src/queue/clearable_queue.dart';
|
|
||||||
export 'src/queue/entity_not_found_exception.dart';
|
|
||||||
export 'src/queue/entity_resolver.dart';
|
|
||||||
export 'src/queue/factory.dart';
|
|
||||||
export 'src/queue/job.dart';
|
|
||||||
export 'src/queue/monitor.dart';
|
|
||||||
export 'src/queue/queue.dart';
|
|
||||||
export 'src/queue/queueable_collection.dart';
|
|
||||||
export 'src/queue/queueable_entity.dart';
|
|
||||||
export 'src/queue/should_be_encrypted.dart';
|
|
||||||
export 'src/queue/should_be_unique.dart';
|
|
||||||
export 'src/queue/should_be_unique_until_processing.dart';
|
|
||||||
export 'src/queue/should_queue.dart';
|
|
||||||
export 'src/queue/should_queue_after_commit.dart';
|
|
|
@ -1,10 +0,0 @@
|
||||||
/// Support for doing something awesome.
|
|
||||||
///
|
|
||||||
/// More dartdocs go here.
|
|
||||||
library;
|
|
||||||
|
|
||||||
// Redis Contracts
|
|
||||||
export 'src/redis/connection.dart';
|
|
||||||
export 'src/redis/connector.dart';
|
|
||||||
export 'src/redis/factory.dart';
|
|
||||||
export 'src/redis/limiter_timeout_exception.dart';
|
|
|
@ -1,11 +0,0 @@
|
||||||
/// Support for doing something awesome.
|
|
||||||
///
|
|
||||||
/// More dartdocs go here.
|
|
||||||
library;
|
|
||||||
|
|
||||||
// Routing Contracts
|
|
||||||
export 'src/routing/binding_registrar.dart';
|
|
||||||
export 'src/routing/registrar.dart';
|
|
||||||
export 'src/routing/response_factory.dart';
|
|
||||||
export 'src/routing/url_generator.dart';
|
|
||||||
export 'src/routing/url_routable.dart';
|
|
|
@ -1,10 +0,0 @@
|
||||||
/// Support for doing something awesome.
|
|
||||||
///
|
|
||||||
/// More dartdocs go here.
|
|
||||||
library;
|
|
||||||
|
|
||||||
// Session Middleware Contracts
|
|
||||||
export 'src/session/middleware/authenticates_sessions.dart';
|
|
||||||
|
|
||||||
// Session Contracts
|
|
||||||
export 'src/session/session.dart';
|
|
|
@ -1,9 +0,0 @@
|
||||||
abstract class Authorizable {
|
|
||||||
/// Determine if the entity has a given ability.
|
|
||||||
///
|
|
||||||
/// [abilities] can be an Iterable or a String.
|
|
||||||
/// [arguments] can be a List or a dynamic type.
|
|
||||||
///
|
|
||||||
/// Returns a boolean indicating if the entity has the given ability.
|
|
||||||
bool can(dynamic abilities, [List<dynamic> arguments = const []]);
|
|
||||||
}
|
|
|
@ -1,51 +0,0 @@
|
||||||
// import 'package:meta/meta.dart';
|
|
||||||
|
|
||||||
abstract class Gate {
|
|
||||||
/// Determine if a given ability has been defined.
|
|
||||||
bool has(String ability);
|
|
||||||
|
|
||||||
/// Define a new ability.
|
|
||||||
Gate define(String ability, dynamic callback);
|
|
||||||
|
|
||||||
/// Define abilities for a resource.
|
|
||||||
Gate resource(String name, String className, [List<String>? abilities]);
|
|
||||||
|
|
||||||
/// Define a policy class for a given class type.
|
|
||||||
Gate policy(String className, String policy);
|
|
||||||
|
|
||||||
/// Register a callback to run before all Gate checks.
|
|
||||||
Gate before(Function callback);
|
|
||||||
|
|
||||||
/// Register a callback to run after all Gate checks.
|
|
||||||
Gate after(Function callback);
|
|
||||||
|
|
||||||
/// Determine if all of the given abilities should be granted for the current user.
|
|
||||||
bool allows(dynamic ability, [dynamic arguments]);
|
|
||||||
|
|
||||||
/// Determine if any of the given abilities should be denied for the current user.
|
|
||||||
bool denies(dynamic ability, [dynamic arguments]);
|
|
||||||
|
|
||||||
/// Determine if all of the given abilities should be granted for the current user.
|
|
||||||
bool check(dynamic abilities, [dynamic arguments]);
|
|
||||||
|
|
||||||
/// Determine if any one of the given abilities should be granted for the current user.
|
|
||||||
bool any(dynamic abilities, [dynamic arguments]);
|
|
||||||
|
|
||||||
/// Determine if the given ability should be granted for the current user.
|
|
||||||
dynamic authorize(String ability, [dynamic arguments]);
|
|
||||||
|
|
||||||
/// Inspect the user for the given ability.
|
|
||||||
dynamic inspect(String ability, [dynamic arguments]);
|
|
||||||
|
|
||||||
/// Get the raw result from the authorization callback.
|
|
||||||
dynamic raw(String ability, [dynamic arguments]);
|
|
||||||
|
|
||||||
/// Get a policy instance for a given class.
|
|
||||||
dynamic getPolicyFor(dynamic className);
|
|
||||||
|
|
||||||
/// Get a guard instance for the given user.
|
|
||||||
Gate forUser(dynamic user);
|
|
||||||
|
|
||||||
/// Get all of the defined abilities.
|
|
||||||
List<String> abilities();
|
|
||||||
}
|
|
|
@ -1,37 +0,0 @@
|
||||||
abstract class Authenticatable {
|
|
||||||
/// Get the name of the unique identifier for the user.
|
|
||||||
///
|
|
||||||
/// @return string
|
|
||||||
String getAuthIdentifierName();
|
|
||||||
|
|
||||||
/// Get the unique identifier for the user.
|
|
||||||
///
|
|
||||||
/// @return dynamic
|
|
||||||
dynamic getAuthIdentifier();
|
|
||||||
|
|
||||||
/// Get the name of the password attribute for the user.
|
|
||||||
///
|
|
||||||
/// @return string
|
|
||||||
String getAuthPasswordName();
|
|
||||||
|
|
||||||
/// Get the password for the user.
|
|
||||||
///
|
|
||||||
/// @return string
|
|
||||||
String getAuthPassword();
|
|
||||||
|
|
||||||
/// Get the token value for the "remember me" session.
|
|
||||||
///
|
|
||||||
/// @return string
|
|
||||||
String getRememberToken();
|
|
||||||
|
|
||||||
/// Set the token value for the "remember me" session.
|
|
||||||
///
|
|
||||||
/// @param string value
|
|
||||||
/// @return void
|
|
||||||
void setRememberToken(String value);
|
|
||||||
|
|
||||||
/// Get the column name for the "remember me" token.
|
|
||||||
///
|
|
||||||
/// @return string
|
|
||||||
String getRememberTokenName();
|
|
||||||
}
|
|
|
@ -1,12 +0,0 @@
|
||||||
abstract class CanResetPassword {
|
|
||||||
/// Get the e-mail address where password reset links are sent.
|
|
||||||
///
|
|
||||||
/// @return string
|
|
||||||
String getEmailForPasswordReset();
|
|
||||||
|
|
||||||
/// Send the password reset notification.
|
|
||||||
///
|
|
||||||
/// @param string token
|
|
||||||
/// @return void
|
|
||||||
void sendPasswordResetNotification(String token);
|
|
||||||
}
|
|
|
@ -1,16 +0,0 @@
|
||||||
//import 'package:your_project_path/contracts/auth/guard.dart';
|
|
||||||
//import 'package:your_project_path/contracts/auth/stateful_guard.dart';
|
|
||||||
import 'package:protevus_contracts/auth.dart';
|
|
||||||
|
|
||||||
abstract class Factory {
|
|
||||||
/// Get a guard instance by name.
|
|
||||||
///
|
|
||||||
/// @param [name] The name of the guard instance to retrieve.
|
|
||||||
/// @return An instance of [Guard] or [StatefulGuard].
|
|
||||||
Guard guard(String? name);
|
|
||||||
|
|
||||||
/// Set the default guard the factory should serve.
|
|
||||||
///
|
|
||||||
/// @param [name] The name of the default guard.
|
|
||||||
void shouldUse(String name);
|
|
||||||
}
|
|
|
@ -1,43 +0,0 @@
|
||||||
import 'authenticatable.dart';
|
|
||||||
abstract class Guard {
|
|
||||||
/// Determine if the current user is authenticated.
|
|
||||||
///
|
|
||||||
/// @return bool
|
|
||||||
bool check();
|
|
||||||
|
|
||||||
/// Determine if the current user is a guest.
|
|
||||||
///
|
|
||||||
/// @return bool
|
|
||||||
bool guest();
|
|
||||||
|
|
||||||
/// Get the currently authenticated user.
|
|
||||||
///
|
|
||||||
/// @return Authenticatable|null
|
|
||||||
Authenticatable? user();
|
|
||||||
|
|
||||||
/// Get the ID for the currently authenticated user.
|
|
||||||
///
|
|
||||||
/// @return int|string|null
|
|
||||||
dynamic id();
|
|
||||||
|
|
||||||
/// Validate a user's credentials.
|
|
||||||
///
|
|
||||||
/// @param Map<String, dynamic> credentials
|
|
||||||
/// @return bool
|
|
||||||
bool validate(Map<String, dynamic> credentials);
|
|
||||||
|
|
||||||
/// Determine if the guard has a user instance.
|
|
||||||
///
|
|
||||||
/// @return bool
|
|
||||||
bool hasUser();
|
|
||||||
|
|
||||||
/// Set the current user.
|
|
||||||
///
|
|
||||||
/// @param Authenticatable user
|
|
||||||
/// @return Guard
|
|
||||||
Guard setUser(Authenticatable user);
|
|
||||||
}
|
|
||||||
|
|
||||||
//abstract class Authenticatable {
|
|
||||||
// String getIdentifier();
|
|
||||||
//}
|
|
|
@ -1,3 +0,0 @@
|
||||||
abstract class AuthenticatesRequests {
|
|
||||||
// Define abstract methods or properties if needed
|
|
||||||
}
|
|
|
@ -1,21 +0,0 @@
|
||||||
abstract class MustVerifyEmail {
|
|
||||||
/// Determine if the user has verified their email address.
|
|
||||||
///
|
|
||||||
/// @return bool
|
|
||||||
bool hasVerifiedEmail();
|
|
||||||
|
|
||||||
/// Mark the given user's email as verified.
|
|
||||||
///
|
|
||||||
/// @return bool
|
|
||||||
bool markEmailAsVerified();
|
|
||||||
|
|
||||||
/// Send the email verification notification.
|
|
||||||
///
|
|
||||||
/// @return void
|
|
||||||
void sendEmailVerificationNotification();
|
|
||||||
|
|
||||||
/// Get the email address that should be used for verification.
|
|
||||||
///
|
|
||||||
/// @return string
|
|
||||||
String getEmailForVerification();
|
|
||||||
}
|
|
|
@ -1,34 +0,0 @@
|
||||||
import 'dart:async';
|
|
||||||
|
|
||||||
typedef Closure = FutureOr<dynamic> Function();
|
|
||||||
|
|
||||||
abstract class PasswordBroker {
|
|
||||||
/// Constant representing a successfully sent reminder.
|
|
||||||
static const String RESET_LINK_SENT = 'passwords.sent';
|
|
||||||
|
|
||||||
/// Constant representing a successfully reset password.
|
|
||||||
static const String PASSWORD_RESET = 'passwords.reset';
|
|
||||||
|
|
||||||
/// Constant representing the user not found response.
|
|
||||||
static const String INVALID_USER = 'passwords.user';
|
|
||||||
|
|
||||||
/// Constant representing an invalid token.
|
|
||||||
static const String INVALID_TOKEN = 'passwords.token';
|
|
||||||
|
|
||||||
/// Constant representing a throttled reset attempt.
|
|
||||||
static const String RESET_THROTTLED = 'passwords.throttled';
|
|
||||||
|
|
||||||
/// Send a password reset link to a user.
|
|
||||||
///
|
|
||||||
/// @param Map<String, dynamic> credentials
|
|
||||||
/// @param Closure? callback
|
|
||||||
/// @return Future<String>
|
|
||||||
Future<String> sendResetLink(Map<String, dynamic> credentials, [Closure? callback]);
|
|
||||||
|
|
||||||
/// Reset the password for the given token.
|
|
||||||
///
|
|
||||||
/// @param Map<String, dynamic> credentials
|
|
||||||
/// @param Closure callback
|
|
||||||
/// @return Future<dynamic>
|
|
||||||
Future<dynamic> reset(Map<String, dynamic> credentials, Closure callback);
|
|
||||||
}
|
|
|
@ -1,9 +0,0 @@
|
||||||
import 'password_broker.dart';
|
|
||||||
|
|
||||||
abstract class PasswordBrokerFactory {
|
|
||||||
/// Get a password broker instance by name.
|
|
||||||
///
|
|
||||||
/// @param String? name
|
|
||||||
/// @return PasswordBroker
|
|
||||||
PasswordBroker broker([String? name]);
|
|
||||||
}
|
|
|
@ -1,44 +0,0 @@
|
||||||
import 'authenticatable.dart';
|
|
||||||
import 'guard.dart';
|
|
||||||
|
|
||||||
abstract class StatefulGuard extends Guard {
|
|
||||||
/// Attempt to authenticate a user using the given credentials.
|
|
||||||
///
|
|
||||||
/// [credentials] are the user's credentials.
|
|
||||||
/// [remember] indicates if the user should be remembered.
|
|
||||||
/// Returns true if authentication was successful.
|
|
||||||
Future<bool> attempt(Map<String, dynamic> credentials, {bool remember = false});
|
|
||||||
|
|
||||||
/// Log a user into the application without sessions or cookies.
|
|
||||||
///
|
|
||||||
/// [credentials] are the user's credentials.
|
|
||||||
/// Returns true if authentication was successful.
|
|
||||||
Future<bool> once(Map<String, dynamic> credentials);
|
|
||||||
|
|
||||||
/// Log a user into the application.
|
|
||||||
///
|
|
||||||
/// [user] is the user to log in.
|
|
||||||
/// [remember] indicates if the user should be remembered.
|
|
||||||
void login(Authenticatable user, {bool remember = false});
|
|
||||||
|
|
||||||
/// Log the given user ID into the application.
|
|
||||||
///
|
|
||||||
/// [id] is the ID of the user.
|
|
||||||
/// [remember] indicates if the user should be remembered.
|
|
||||||
/// Returns the authenticated user or false if authentication failed.
|
|
||||||
Future<Authenticatable?> loginUsingId(dynamic id, {bool remember = false});
|
|
||||||
|
|
||||||
/// Log the given user ID into the application without sessions or cookies.
|
|
||||||
///
|
|
||||||
/// [id] is the ID of the user.
|
|
||||||
/// Returns the authenticated user or false if authentication failed.
|
|
||||||
Future<Authenticatable?> onceUsingId(dynamic id);
|
|
||||||
|
|
||||||
/// Determine if the user was authenticated via "remember me" cookie.
|
|
||||||
///
|
|
||||||
/// Returns true if authenticated via "remember me" cookie.
|
|
||||||
bool viaRemember();
|
|
||||||
|
|
||||||
/// Log the user out of the application.
|
|
||||||
void logout();
|
|
||||||
}
|
|
|
@ -1,19 +0,0 @@
|
||||||
//import 'package:symfony/http_foundation.dart';
|
|
||||||
|
|
||||||
abstract class SupportsBasicAuth {
|
|
||||||
/// Attempt to authenticate using HTTP Basic Auth.
|
|
||||||
///
|
|
||||||
/// @param String field
|
|
||||||
/// @param Map<String, dynamic> extraConditions
|
|
||||||
/// @return Response|null
|
|
||||||
Response? basic({String field = 'email', Map<String, dynamic> extraConditions = const {}});
|
|
||||||
|
|
||||||
/// Perform a stateless HTTP Basic login attempt.
|
|
||||||
///
|
|
||||||
/// @param String field
|
|
||||||
/// @param Map<String, dynamic> extraConditions
|
|
||||||
/// @return Response|null
|
|
||||||
Response? onceBasic({String field = 'email', Map<String, dynamic> extraConditions = const {}});
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO: Find a dart package to replace symfony package for Response.
|
|
|
@ -1,44 +0,0 @@
|
||||||
import 'authenticatable.dart';
|
|
||||||
|
|
||||||
abstract class UserProvider {
|
|
||||||
/// Retrieve a user by their unique identifier.
|
|
||||||
///
|
|
||||||
/// @param dynamic identifier
|
|
||||||
/// @return Authenticatable|null
|
|
||||||
Future<Authenticatable?> retrieveById(dynamic identifier);
|
|
||||||
|
|
||||||
/// Retrieve a user by their unique identifier and "remember me" token.
|
|
||||||
///
|
|
||||||
/// @param dynamic identifier
|
|
||||||
/// @param String token
|
|
||||||
/// @return Authenticatable|null
|
|
||||||
Future<Authenticatable?> retrieveByToken(dynamic identifier, String token);
|
|
||||||
|
|
||||||
/// Update the "remember me" token for the given user in storage.
|
|
||||||
///
|
|
||||||
/// @param Authenticatable user
|
|
||||||
/// @param String token
|
|
||||||
/// @return void
|
|
||||||
Future<void> updateRememberToken(Authenticatable user, String token);
|
|
||||||
|
|
||||||
/// Retrieve a user by the given credentials.
|
|
||||||
///
|
|
||||||
/// @param Map<String, dynamic> credentials
|
|
||||||
/// @return Authenticatable|null
|
|
||||||
Future<Authenticatable?> retrieveByCredentials(Map<String, dynamic> credentials);
|
|
||||||
|
|
||||||
/// Validate a user against the given credentials.
|
|
||||||
///
|
|
||||||
/// @param Authenticatable user
|
|
||||||
/// @param Map<String, dynamic> credentials
|
|
||||||
/// @return bool
|
|
||||||
Future<bool> validateCredentials(Authenticatable user, Map<String, dynamic> credentials);
|
|
||||||
|
|
||||||
/// Rehash the user's password if required and supported.
|
|
||||||
///
|
|
||||||
/// @param Authenticatable user
|
|
||||||
/// @param Map<String, dynamic> credentials
|
|
||||||
/// @param bool force
|
|
||||||
/// @return void
|
|
||||||
Future<void> rehashPasswordIfRequired(Authenticatable user, Map<String, dynamic> credentials, {bool force = false});
|
|
||||||
}
|
|
|
@ -1,36 +0,0 @@
|
||||||
//import 'package:some_http_package/some_http_package.dart'; // Replace with actual HTTP package
|
|
||||||
|
|
||||||
abstract class Broadcaster {
|
|
||||||
/// Authenticate the incoming request for a given channel.
|
|
||||||
///
|
|
||||||
/// @param Request request
|
|
||||||
/// @return mixed
|
|
||||||
Future<dynamic> auth(Request request);
|
|
||||||
|
|
||||||
/// Return the valid authentication response.
|
|
||||||
///
|
|
||||||
/// @param Request request
|
|
||||||
/// @param mixed result
|
|
||||||
/// @return mixed
|
|
||||||
Future<dynamic> validAuthenticationResponse(Request request, dynamic result);
|
|
||||||
|
|
||||||
/// Broadcast the given event.
|
|
||||||
///
|
|
||||||
/// @param List<String> channels
|
|
||||||
/// @param String event
|
|
||||||
/// @param Map<String, dynamic> payload
|
|
||||||
/// @return void
|
|
||||||
///
|
|
||||||
/// @throws BroadcastException
|
|
||||||
Future<void> broadcast(List<String> channels, String event, {Map<String, dynamic> payload = const {}});
|
|
||||||
}
|
|
||||||
|
|
||||||
class BroadcastException implements Exception {
|
|
||||||
final String message;
|
|
||||||
BroadcastException(this.message);
|
|
||||||
|
|
||||||
@override
|
|
||||||
String toString() => 'BroadcastException: $message';
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO: Find dart library to replace symfony for Request Class.
|
|
|
@ -1,10 +0,0 @@
|
||||||
|
|
||||||
import 'broadcaster.dart';
|
|
||||||
|
|
||||||
abstract class Factory {
|
|
||||||
/// Get a broadcaster implementation by name.
|
|
||||||
///
|
|
||||||
/// @param [name] The name of the broadcaster.
|
|
||||||
/// @return A [Broadcaster] implementation.
|
|
||||||
Broadcaster connection([String? name]);
|
|
||||||
}
|
|
|
@ -1,12 +0,0 @@
|
||||||
|
|
||||||
abstract class HasBroadcastChannel {
|
|
||||||
/// Get the broadcast channel route definition that is associated with the given entity.
|
|
||||||
///
|
|
||||||
/// @return string
|
|
||||||
String broadcastChannelRoute();
|
|
||||||
|
|
||||||
/// Get the broadcast channel name that is associated with the given entity.
|
|
||||||
///
|
|
||||||
/// @return string
|
|
||||||
String broadcastChannel();
|
|
||||||
}
|
|
|
@ -1,4 +0,0 @@
|
||||||
|
|
||||||
abstract class ShouldBeUnique {
|
|
||||||
// No methods or properties defined; serves as a marker interface
|
|
||||||
}
|
|
|
@ -1,6 +0,0 @@
|
||||||
abstract class ShouldBroadcast {
|
|
||||||
/// Get the channels the event should broadcast on.
|
|
||||||
///
|
|
||||||
/// Returns either a single channel or a list of channels.
|
|
||||||
dynamic broadcastOn();
|
|
||||||
}
|
|
|
@ -1,5 +0,0 @@
|
||||||
import 'should_broadcast.dart';
|
|
||||||
|
|
||||||
abstract class ShouldBroadcastNow implements ShouldBroadcast {
|
|
||||||
// Additional methods and properties can be added here if needed.
|
|
||||||
}
|
|
|
@ -1,47 +0,0 @@
|
||||||
abstract class Dispatcher {
|
|
||||||
/// Dispatch a command to its appropriate handler.
|
|
||||||
///
|
|
||||||
/// @param dynamic command
|
|
||||||
/// @return dynamic
|
|
||||||
dynamic dispatch(dynamic command);
|
|
||||||
|
|
||||||
/// Dispatch a command to its appropriate handler in the current process.
|
|
||||||
///
|
|
||||||
/// Queueable jobs will be dispatched to the "sync" queue.
|
|
||||||
///
|
|
||||||
/// @param dynamic command
|
|
||||||
/// @param dynamic handler
|
|
||||||
/// @return dynamic
|
|
||||||
dynamic dispatchSync(dynamic command, [dynamic handler]);
|
|
||||||
|
|
||||||
/// Dispatch a command to its appropriate handler in the current process.
|
|
||||||
///
|
|
||||||
/// @param dynamic command
|
|
||||||
/// @param dynamic handler
|
|
||||||
/// @return dynamic
|
|
||||||
dynamic dispatchNow(dynamic command, [dynamic handler]);
|
|
||||||
|
|
||||||
/// Determine if the given command has a handler.
|
|
||||||
///
|
|
||||||
/// @param dynamic command
|
|
||||||
/// @return bool
|
|
||||||
bool hasCommandHandler(dynamic command);
|
|
||||||
|
|
||||||
/// Retrieve the handler for a command.
|
|
||||||
///
|
|
||||||
/// @param dynamic command
|
|
||||||
/// @return bool|dynamic
|
|
||||||
dynamic getCommandHandler(dynamic command);
|
|
||||||
|
|
||||||
/// Set the pipes commands should be piped through before dispatching.
|
|
||||||
///
|
|
||||||
/// @param List<dynamic> pipes
|
|
||||||
/// @return this
|
|
||||||
Dispatcher pipeThrough(List<dynamic> pipes);
|
|
||||||
|
|
||||||
/// Map a command to a handler.
|
|
||||||
///
|
|
||||||
/// @param Map<dynamic, dynamic> map
|
|
||||||
/// @return this
|
|
||||||
Dispatcher map(Map<dynamic, dynamic> map);
|
|
||||||
}
|
|
|
@ -1,25 +0,0 @@
|
||||||
import 'dispatcher.dart';
|
|
||||||
import 'batch.dart';
|
|
||||||
import 'pending_batch.dart';
|
|
||||||
|
|
||||||
// TODO: Missing imports will come from other ports refer to original PHP file.
|
|
||||||
|
|
||||||
abstract class QueueingDispatcher implements Dispatcher {
|
|
||||||
/// Attempt to find the batch with the given ID.
|
|
||||||
///
|
|
||||||
/// @param String batchId
|
|
||||||
/// @return Batch|null
|
|
||||||
Future<Batch?> findBatch(String batchId);
|
|
||||||
|
|
||||||
/// Create a new batch of queueable jobs.
|
|
||||||
///
|
|
||||||
/// @param List<dynamic> jobs
|
|
||||||
/// @return PendingBatch
|
|
||||||
PendingBatch batch(List<dynamic> jobs);
|
|
||||||
|
|
||||||
/// Dispatch a command to its appropriate handler behind a queue.
|
|
||||||
///
|
|
||||||
/// @param dynamic command
|
|
||||||
/// @return dynamic
|
|
||||||
Future<dynamic> dispatchToQueue(dynamic command);
|
|
||||||
}
|
|
|
@ -1,9 +0,0 @@
|
||||||
import 'repository.dart';
|
|
||||||
|
|
||||||
abstract class Factory {
|
|
||||||
/// Get a cache store instance by name.
|
|
||||||
///
|
|
||||||
/// @param String? name
|
|
||||||
/// @return Repository
|
|
||||||
Repository store([String? name]);
|
|
||||||
}
|
|
29
packages/contracts/lib/src/cache/lock.dart
vendored
29
packages/contracts/lib/src/cache/lock.dart
vendored
|
@ -1,29 +0,0 @@
|
||||||
abstract class Lock {
|
|
||||||
/// Attempt to acquire the lock.
|
|
||||||
///
|
|
||||||
/// @param Function? callback
|
|
||||||
/// @return dynamic
|
|
||||||
Future<dynamic> get([Function? callback]);
|
|
||||||
|
|
||||||
/// Attempt to acquire the lock for the given number of seconds.
|
|
||||||
///
|
|
||||||
/// @param int seconds
|
|
||||||
/// @param Function? callback
|
|
||||||
/// @return dynamic
|
|
||||||
Future<dynamic> block(int seconds, [Function? callback]);
|
|
||||||
|
|
||||||
/// Release the lock.
|
|
||||||
///
|
|
||||||
/// @return bool
|
|
||||||
Future<bool> release();
|
|
||||||
|
|
||||||
/// Returns the current owner of the lock.
|
|
||||||
///
|
|
||||||
/// @return String
|
|
||||||
Future<String> owner();
|
|
||||||
|
|
||||||
/// Releases this lock in disregard of ownership.
|
|
||||||
///
|
|
||||||
/// @return void
|
|
||||||
Future<void> forceRelease();
|
|
||||||
}
|
|
|
@ -1,17 +0,0 @@
|
||||||
import 'lock.dart';
|
|
||||||
abstract class LockProvider {
|
|
||||||
/// Get a lock instance.
|
|
||||||
///
|
|
||||||
/// @param String name
|
|
||||||
/// @param int seconds
|
|
||||||
/// @param String|null owner
|
|
||||||
/// @return Lock
|
|
||||||
Lock lock(String name, {int seconds = 0, String? owner});
|
|
||||||
|
|
||||||
/// Restore a lock instance using the owner identifier.
|
|
||||||
///
|
|
||||||
/// @param String name
|
|
||||||
/// @param String owner
|
|
||||||
/// @return Lock
|
|
||||||
Lock restoreLock(String name, String owner);
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
|
|
||||||
class LockTimeoutException implements Exception {
|
|
||||||
final String message;
|
|
||||||
|
|
||||||
LockTimeoutException([this.message = '']);
|
|
||||||
|
|
||||||
@override
|
|
||||||
String toString() {
|
|
||||||
return 'LockTimeoutException: $message';
|
|
||||||
}
|
|
||||||
}
|
|
96
packages/contracts/lib/src/cache/repository.dart
vendored
96
packages/contracts/lib/src/cache/repository.dart
vendored
|
@ -1,96 +0,0 @@
|
||||||
import 'package:meta/meta.dart';
|
|
||||||
import 'package:psr/simple_cache.dart';
|
|
||||||
import 'dart:async';
|
|
||||||
|
|
||||||
// TODO: Find dart replacements for missing imports.
|
|
||||||
|
|
||||||
abstract class Repository implements CacheInterface {
|
|
||||||
/// Retrieve an item from the cache and delete it.
|
|
||||||
///
|
|
||||||
/// @template TCacheValue
|
|
||||||
///
|
|
||||||
/// @param List<String>|String key
|
|
||||||
/// @param TCacheValue|Future<TCacheValue> Function() default
|
|
||||||
/// @return Future<TCacheValue>
|
|
||||||
Future<dynamic> pull(dynamic key, [dynamic defaultValue]);
|
|
||||||
|
|
||||||
/// Store an item in the cache.
|
|
||||||
///
|
|
||||||
/// @param String key
|
|
||||||
/// @param dynamic value
|
|
||||||
/// @param DateTime|Duration|int|null ttl
|
|
||||||
/// @return Future<bool>
|
|
||||||
Future<bool> put(String key, dynamic value, [dynamic ttl]);
|
|
||||||
|
|
||||||
/// Store an item in the cache if the key does not exist.
|
|
||||||
///
|
|
||||||
/// @param String key
|
|
||||||
/// @param dynamic value
|
|
||||||
/// @param DateTime|Duration|int|null ttl
|
|
||||||
/// @return Future<bool>
|
|
||||||
Future<bool> add(String key, dynamic value, [dynamic ttl]);
|
|
||||||
|
|
||||||
/// Increment the value of an item in the cache.
|
|
||||||
///
|
|
||||||
/// @param String key
|
|
||||||
/// @param dynamic value
|
|
||||||
/// @return Future<int|bool>
|
|
||||||
Future<dynamic> increment(String key, [int value = 1]);
|
|
||||||
|
|
||||||
/// Decrement the value of an item in the cache.
|
|
||||||
///
|
|
||||||
/// @param String key
|
|
||||||
/// @param dynamic value
|
|
||||||
/// @return Future<int|bool>
|
|
||||||
Future<dynamic> decrement(String key, [int value = 1]);
|
|
||||||
|
|
||||||
/// Store an item in the cache indefinitely.
|
|
||||||
///
|
|
||||||
/// @param String key
|
|
||||||
/// @param dynamic value
|
|
||||||
/// @return Future<bool>
|
|
||||||
Future<bool> forever(String key, dynamic value);
|
|
||||||
|
|
||||||
/// Get an item from the cache, or execute the given Closure and store the result.
|
|
||||||
///
|
|
||||||
/// @template TCacheValue
|
|
||||||
///
|
|
||||||
/// @param String key
|
|
||||||
/// @param DateTime|Duration|Future<TCacheValue> Function()|int|null ttl
|
|
||||||
/// @param Future<TCacheValue> Function() callback
|
|
||||||
/// @return Future<TCacheValue>
|
|
||||||
Future<dynamic> remember(String key, dynamic ttl, Future<dynamic> Function() callback);
|
|
||||||
|
|
||||||
/// Get an item from the cache, or execute the given Closure and store the result forever.
|
|
||||||
///
|
|
||||||
/// @template TCacheValue
|
|
||||||
///
|
|
||||||
/// @param String key
|
|
||||||
/// @param Future<TCacheValue> Function() callback
|
|
||||||
/// @return Future<TCacheValue>
|
|
||||||
Future<dynamic> sear(String key, Future<dynamic> Function() callback);
|
|
||||||
|
|
||||||
/// Get an item from the cache, or execute the given Closure and store the result forever.
|
|
||||||
///
|
|
||||||
/// @template TCacheValue
|
|
||||||
///
|
|
||||||
/// @param String key
|
|
||||||
/// @param Future<TCacheValue> Function() callback
|
|
||||||
/// @return Future<TCacheValue>
|
|
||||||
Future<dynamic> rememberForever(String key, Future<dynamic> Function() callback);
|
|
||||||
|
|
||||||
/// Remove an item from the cache.
|
|
||||||
///
|
|
||||||
/// @param String key
|
|
||||||
/// @return Future<bool>
|
|
||||||
Future<bool> forget(String key);
|
|
||||||
|
|
||||||
/// Get the cache store implementation.
|
|
||||||
///
|
|
||||||
/// @return CacheStore
|
|
||||||
CacheStore getStore();
|
|
||||||
}
|
|
||||||
|
|
||||||
abstract class CacheStore {
|
|
||||||
// Define methods that a CacheStore should have.
|
|
||||||
}
|
|
67
packages/contracts/lib/src/cache/store.dart
vendored
67
packages/contracts/lib/src/cache/store.dart
vendored
|
@ -1,67 +0,0 @@
|
||||||
abstract class Store {
|
|
||||||
/// Retrieve an item from the cache by key.
|
|
||||||
///
|
|
||||||
/// @param String key
|
|
||||||
/// @return dynamic
|
|
||||||
dynamic get(String key);
|
|
||||||
|
|
||||||
/// Retrieve multiple items from the cache by key.
|
|
||||||
///
|
|
||||||
/// Items not found in the cache will have a null value.
|
|
||||||
///
|
|
||||||
/// @param List<String> keys
|
|
||||||
/// @return Map<String, dynamic>
|
|
||||||
Map<String, dynamic> many(List<String> keys);
|
|
||||||
|
|
||||||
/// Store an item in the cache for a given number of seconds.
|
|
||||||
///
|
|
||||||
/// @param String key
|
|
||||||
/// @param dynamic value
|
|
||||||
/// @param int seconds
|
|
||||||
/// @return bool
|
|
||||||
bool put(String key, dynamic value, int seconds);
|
|
||||||
|
|
||||||
/// Store multiple items in the cache for a given number of seconds.
|
|
||||||
///
|
|
||||||
/// @param Map<String, dynamic> values
|
|
||||||
/// @param int seconds
|
|
||||||
/// @return bool
|
|
||||||
bool putMany(Map<String, dynamic> values, int seconds);
|
|
||||||
|
|
||||||
/// Increment the value of an item in the cache.
|
|
||||||
///
|
|
||||||
/// @param String key
|
|
||||||
/// @param dynamic value
|
|
||||||
/// @return int|bool
|
|
||||||
dynamic increment(String key, {dynamic value = 1});
|
|
||||||
|
|
||||||
/// Decrement the value of an item in the cache.
|
|
||||||
///
|
|
||||||
/// @param String key
|
|
||||||
/// @param dynamic value
|
|
||||||
/// @return int|bool
|
|
||||||
dynamic decrement(String key, {dynamic value = 1});
|
|
||||||
|
|
||||||
/// Store an item in the cache indefinitely.
|
|
||||||
///
|
|
||||||
/// @param String key
|
|
||||||
/// @param dynamic value
|
|
||||||
/// @return bool
|
|
||||||
bool forever(String key, dynamic value);
|
|
||||||
|
|
||||||
/// Remove an item from the cache.
|
|
||||||
///
|
|
||||||
/// @param String key
|
|
||||||
/// @return bool
|
|
||||||
bool forget(String key);
|
|
||||||
|
|
||||||
/// Remove all items from the cache.
|
|
||||||
///
|
|
||||||
/// @return bool
|
|
||||||
bool flush();
|
|
||||||
|
|
||||||
/// Get the cache key prefix.
|
|
||||||
///
|
|
||||||
/// @return String
|
|
||||||
String getPrefix();
|
|
||||||
}
|
|
|
@ -1,40 +0,0 @@
|
||||||
abstract class Repository {
|
|
||||||
/// Determine if the given configuration value exists.
|
|
||||||
///
|
|
||||||
/// @param String key
|
|
||||||
/// @return bool
|
|
||||||
bool has(String key);
|
|
||||||
|
|
||||||
/// Get the specified configuration value.
|
|
||||||
///
|
|
||||||
/// @param String key
|
|
||||||
/// @param dynamic defaultValue
|
|
||||||
/// @return dynamic
|
|
||||||
dynamic get(String key, [dynamic defaultValue]);
|
|
||||||
|
|
||||||
/// Get all of the configuration items for the application.
|
|
||||||
///
|
|
||||||
/// @return Map<String, dynamic>
|
|
||||||
Map<String, dynamic> all();
|
|
||||||
|
|
||||||
/// Set a given configuration value.
|
|
||||||
///
|
|
||||||
/// @param String key
|
|
||||||
/// @param dynamic value
|
|
||||||
/// @return void
|
|
||||||
void set(String key, [dynamic value]);
|
|
||||||
|
|
||||||
/// Prepend a value onto an array configuration value.
|
|
||||||
///
|
|
||||||
/// @param String key
|
|
||||||
/// @param dynamic value
|
|
||||||
/// @return void
|
|
||||||
void prepend(String key, dynamic value);
|
|
||||||
|
|
||||||
/// Push a value onto an array configuration value.
|
|
||||||
///
|
|
||||||
/// @param String key
|
|
||||||
/// @param dynamic value
|
|
||||||
/// @return void
|
|
||||||
void push(String key, dynamic value);
|
|
||||||
}
|
|
|
@ -1,17 +0,0 @@
|
||||||
import 'package:symfony_console/symfony_console.dart';
|
|
||||||
|
|
||||||
abstract class Application {
|
|
||||||
/// Run an Artisan console command by name.
|
|
||||||
///
|
|
||||||
/// [command] is the name of the command to run.
|
|
||||||
/// [parameters] is the list of parameters to pass to the command.
|
|
||||||
/// [outputBuffer] is the buffer to capture the command output.
|
|
||||||
///
|
|
||||||
/// Returns the exit code of the command.
|
|
||||||
int call(String command, {List<String> parameters = const [], OutputInterface? outputBuffer});
|
|
||||||
|
|
||||||
/// Get the output from the last command.
|
|
||||||
///
|
|
||||||
/// Returns the output as a string.
|
|
||||||
String output();
|
|
||||||
}
|
|
|
@ -1,4 +0,0 @@
|
||||||
|
|
||||||
abstract class Isolatable {
|
|
||||||
// Abstract class with no methods
|
|
||||||
}
|
|
|
@ -1,51 +0,0 @@
|
||||||
import 'package:symfony_console/symfony_console.dart';
|
|
||||||
|
|
||||||
// TODO: Replace missing imports with dart equivalents.
|
|
||||||
|
|
||||||
abstract class Kernel {
|
|
||||||
/// Bootstrap the application for artisan commands.
|
|
||||||
void bootstrap();
|
|
||||||
|
|
||||||
/// Handle an incoming console command.
|
|
||||||
///
|
|
||||||
/// @param InputInterface input
|
|
||||||
/// @param OutputInterface? output
|
|
||||||
/// @return int
|
|
||||||
int handle(InputInterface input, [OutputInterface? output]);
|
|
||||||
|
|
||||||
/// Run an Artisan console command by name.
|
|
||||||
///
|
|
||||||
/// @param String command
|
|
||||||
/// @param List<dynamic> parameters
|
|
||||||
/// @param OutputInterface? outputBuffer
|
|
||||||
/// @return int
|
|
||||||
int call(String command, [List<dynamic> parameters = const [], OutputInterface? outputBuffer]);
|
|
||||||
|
|
||||||
/// Queue an Artisan console command by name.
|
|
||||||
///
|
|
||||||
/// @param String command
|
|
||||||
/// @param List<dynamic> parameters
|
|
||||||
/// @return PendingDispatch
|
|
||||||
PendingDispatch queue(String command, [List<dynamic> parameters = const []]);
|
|
||||||
|
|
||||||
/// Get all of the commands registered with the console.
|
|
||||||
///
|
|
||||||
/// @return List<dynamic>
|
|
||||||
List<dynamic> all();
|
|
||||||
|
|
||||||
/// Get the output for the last run command.
|
|
||||||
///
|
|
||||||
/// @return String
|
|
||||||
String output();
|
|
||||||
|
|
||||||
/// Terminate the application.
|
|
||||||
///
|
|
||||||
/// @param InputInterface input
|
|
||||||
/// @param int status
|
|
||||||
/// @return void
|
|
||||||
void terminate(InputInterface input, int status);
|
|
||||||
}
|
|
||||||
|
|
||||||
class PendingDispatch {
|
|
||||||
// Implement the PendingDispatch class here
|
|
||||||
}
|
|
|
@ -1,3 +0,0 @@
|
||||||
abstract class PromptsForMissingInput {
|
|
||||||
// This is a placeholder for future methods.
|
|
||||||
}
|
|
|
@ -1,12 +0,0 @@
|
||||||
import 'package:psr_container/psr_container.dart';
|
|
||||||
|
|
||||||
// TODO: find packages to replace missing imports.
|
|
||||||
|
|
||||||
class BindingResolutionException implements Exception, ContainerException {
|
|
||||||
final String message;
|
|
||||||
|
|
||||||
BindingResolutionException([this.message = '']);
|
|
||||||
|
|
||||||
@override
|
|
||||||
String toString() => 'BindingResolutionException: $message';
|
|
||||||
}
|
|
|
@ -1,12 +0,0 @@
|
||||||
import 'package:psr/psr.dart';
|
|
||||||
|
|
||||||
// TODO: Find packages to replace missing imports.
|
|
||||||
|
|
||||||
class CircularDependencyException implements Exception, ContainerExceptionInterface {
|
|
||||||
final String message;
|
|
||||||
|
|
||||||
CircularDependencyException([this.message = '']);
|
|
||||||
|
|
||||||
@override
|
|
||||||
String toString() => 'CircularDependencyException: $message';
|
|
||||||
}
|
|
|
@ -1,174 +0,0 @@
|
||||||
import 'contextual_binding_builder.dart';
|
|
||||||
abstract class Container {
|
|
||||||
/// Determine if the given abstract type has been bound.
|
|
||||||
///
|
|
||||||
/// @param String abstract
|
|
||||||
/// @return bool
|
|
||||||
bool bound(String abstract);
|
|
||||||
|
|
||||||
/// Alias a type to a different name.
|
|
||||||
///
|
|
||||||
/// @param String abstract
|
|
||||||
/// @param String alias
|
|
||||||
/// @return void
|
|
||||||
///
|
|
||||||
/// @throws LogicException
|
|
||||||
void alias(String abstract, String alias);
|
|
||||||
|
|
||||||
/// Assign a set of tags to a given binding.
|
|
||||||
///
|
|
||||||
/// @param List<String>|String abstracts
|
|
||||||
/// @param List<dynamic>|dynamic tags
|
|
||||||
/// @return void
|
|
||||||
void tag(dynamic abstracts, dynamic tags);
|
|
||||||
|
|
||||||
/// Resolve all of the bindings for a given tag.
|
|
||||||
///
|
|
||||||
/// @param String tag
|
|
||||||
/// @return Iterable
|
|
||||||
Iterable tagged(String tag);
|
|
||||||
|
|
||||||
/// Register a binding with the container.
|
|
||||||
///
|
|
||||||
/// @param String abstract
|
|
||||||
/// @param Function|String|null concrete
|
|
||||||
/// @param bool shared
|
|
||||||
/// @return void
|
|
||||||
void bind(String abstract, [dynamic concrete, bool shared = false]);
|
|
||||||
|
|
||||||
/// Bind a callback to resolve with Container::call.
|
|
||||||
///
|
|
||||||
/// @param List<String>|String method
|
|
||||||
/// @param Function callback
|
|
||||||
/// @return void
|
|
||||||
void bindMethod(dynamic method, Function callback);
|
|
||||||
|
|
||||||
/// Register a binding if it hasn't already been registered.
|
|
||||||
///
|
|
||||||
/// @param String abstract
|
|
||||||
/// @param Function|String|null concrete
|
|
||||||
/// @param bool shared
|
|
||||||
/// @return void
|
|
||||||
void bindIf(String abstract, [dynamic concrete, bool shared = false]);
|
|
||||||
|
|
||||||
/// Register a shared binding in the container.
|
|
||||||
///
|
|
||||||
/// @param String abstract
|
|
||||||
/// @param Function|String|null concrete
|
|
||||||
/// @return void
|
|
||||||
void singleton(String abstract, [dynamic concrete]);
|
|
||||||
|
|
||||||
/// Register a shared binding if it hasn't already been registered.
|
|
||||||
///
|
|
||||||
/// @param String abstract
|
|
||||||
/// @param Function|String|null concrete
|
|
||||||
/// @return void
|
|
||||||
void singletonIf(String abstract, [dynamic concrete]);
|
|
||||||
|
|
||||||
/// Register a scoped binding in the container.
|
|
||||||
///
|
|
||||||
/// @param String abstract
|
|
||||||
/// @param Function|String|null concrete
|
|
||||||
/// @return void
|
|
||||||
void scoped(String abstract, [dynamic concrete]);
|
|
||||||
|
|
||||||
/// Register a scoped binding if it hasn't already been registered.
|
|
||||||
///
|
|
||||||
/// @param String abstract
|
|
||||||
/// @param Function|String|null concrete
|
|
||||||
/// @return void
|
|
||||||
void scopedIf(String abstract, [dynamic concrete]);
|
|
||||||
|
|
||||||
/// "Extend" an abstract type in the container.
|
|
||||||
///
|
|
||||||
/// @param String abstract
|
|
||||||
/// @param Function closure
|
|
||||||
/// @return void
|
|
||||||
///
|
|
||||||
/// @throws InvalidArgumentException
|
|
||||||
void extend(String abstract, Function closure);
|
|
||||||
|
|
||||||
/// Register an existing instance as shared in the container.
|
|
||||||
///
|
|
||||||
/// @param String abstract
|
|
||||||
/// @param dynamic instance
|
|
||||||
/// @return dynamic
|
|
||||||
dynamic instance(String abstract, dynamic instance);
|
|
||||||
|
|
||||||
/// Add a contextual binding to the container.
|
|
||||||
///
|
|
||||||
/// @param String concrete
|
|
||||||
/// @param String abstract
|
|
||||||
/// @param Function|String implementation
|
|
||||||
/// @return void
|
|
||||||
void addContextualBinding(String concrete, String abstract, dynamic implementation);
|
|
||||||
|
|
||||||
/// Define a contextual binding.
|
|
||||||
///
|
|
||||||
/// @param String|List<String> concrete
|
|
||||||
/// @return ContextualBindingBuilder
|
|
||||||
ContextualBindingBuilder when(dynamic concrete);
|
|
||||||
|
|
||||||
/// Get a closure to resolve the given type from the container.
|
|
||||||
///
|
|
||||||
/// @param String abstract
|
|
||||||
/// @return Function
|
|
||||||
Function factory(String abstract);
|
|
||||||
|
|
||||||
/// Flush the container of all bindings and resolved instances.
|
|
||||||
///
|
|
||||||
/// @return void
|
|
||||||
void flush();
|
|
||||||
|
|
||||||
/// Resolve the given type from the container.
|
|
||||||
///
|
|
||||||
/// @param String abstract
|
|
||||||
/// @param Map<String, dynamic> parameters
|
|
||||||
/// @return dynamic
|
|
||||||
///
|
|
||||||
/// @throws BindingResolutionException
|
|
||||||
dynamic make(String abstract, [Map<String, dynamic> parameters = const {}]);
|
|
||||||
|
|
||||||
/// Call the given Function / class@method and inject its dependencies.
|
|
||||||
///
|
|
||||||
/// @param dynamic callback
|
|
||||||
/// @param Map<String, dynamic> parameters
|
|
||||||
/// @param String|null defaultMethod
|
|
||||||
/// @return dynamic
|
|
||||||
dynamic call(dynamic callback, [Map<String, dynamic> parameters = const {}, String defaultMethod]);
|
|
||||||
|
|
||||||
/// Determine if the given abstract type has been resolved.
|
|
||||||
///
|
|
||||||
/// @param String abstract
|
|
||||||
/// @return bool
|
|
||||||
bool resolved(String abstract);
|
|
||||||
|
|
||||||
/// Register a new before resolving callback.
|
|
||||||
///
|
|
||||||
/// @param String|Function abstract
|
|
||||||
/// @param Function|null callback
|
|
||||||
/// @return void
|
|
||||||
void beforeResolving(dynamic abstract, [Function? callback]);
|
|
||||||
|
|
||||||
/// Register a new resolving callback.
|
|
||||||
///
|
|
||||||
/// @param String|Function abstract
|
|
||||||
/// @param Function|null callback
|
|
||||||
/// @return void
|
|
||||||
void resolving(dynamic abstract, [Function? callback]);
|
|
||||||
|
|
||||||
/// Register a new after resolving callback.
|
|
||||||
///
|
|
||||||
/// @param String|Function abstract
|
|
||||||
/// @param Function|null callback
|
|
||||||
/// @return void
|
|
||||||
void afterResolving(dynamic abstract, [Function? callback]);
|
|
||||||
}
|
|
||||||
|
|
||||||
class InvalidArgumentException implements Exception {
|
|
||||||
// Implementation for InvalidArgumentException
|
|
||||||
}
|
|
||||||
|
|
||||||
class LogicException implements Exception {
|
|
||||||
// Implementation for LogicException
|
|
||||||
}
|
|
|
@ -1,23 +0,0 @@
|
||||||
abstract class ContextualBindingBuilder {
|
|
||||||
/// Define the abstract target that depends on the context.
|
|
||||||
///
|
|
||||||
/// [abstract] The abstract target.
|
|
||||||
/// Returns the current instance.
|
|
||||||
ContextualBindingBuilder needs(String abstract);
|
|
||||||
|
|
||||||
/// Define the implementation for the contextual binding.
|
|
||||||
///
|
|
||||||
/// [implementation] The implementation which can be a Closure, String, or List.
|
|
||||||
void give(dynamic implementation);
|
|
||||||
|
|
||||||
/// Define tagged services to be used as the implementation for the contextual binding.
|
|
||||||
///
|
|
||||||
/// [tag] The tag to use.
|
|
||||||
void giveTagged(String tag);
|
|
||||||
|
|
||||||
/// Specify the configuration item to bind as a primitive.
|
|
||||||
///
|
|
||||||
/// [key] The configuration key.
|
|
||||||
/// [defaultValue] The default value.
|
|
||||||
void giveConfig(String key, [dynamic defaultValue]);
|
|
||||||
}
|
|
|
@ -1,40 +0,0 @@
|
||||||
import 'package:symfony_http_foundation/symfony_http_foundation.dart';
|
|
||||||
|
|
||||||
// TODO: Replace missing import with dart equivelant.
|
|
||||||
|
|
||||||
abstract class Factory {
|
|
||||||
/// Create a new cookie instance.
|
|
||||||
///
|
|
||||||
/// @param String name
|
|
||||||
/// @param String value
|
|
||||||
/// @param int minutes
|
|
||||||
/// @param String? path
|
|
||||||
/// @param String? domain
|
|
||||||
/// @param bool? secure
|
|
||||||
/// @param bool httpOnly
|
|
||||||
/// @param bool raw
|
|
||||||
/// @param String? sameSite
|
|
||||||
/// @return Cookie
|
|
||||||
Cookie make(String name, String value, {int minutes = 0, String? path, String? domain, bool? secure, bool httpOnly = true, bool raw = false, String? sameSite});
|
|
||||||
|
|
||||||
/// Create a cookie that lasts "forever" (five years).
|
|
||||||
///
|
|
||||||
/// @param String name
|
|
||||||
/// @param String value
|
|
||||||
/// @param String? path
|
|
||||||
/// @param String? domain
|
|
||||||
/// @param bool? secure
|
|
||||||
/// @param bool httpOnly
|
|
||||||
/// @param bool raw
|
|
||||||
/// @param String? sameSite
|
|
||||||
/// @return Cookie
|
|
||||||
Cookie forever(String name, String value, {String? path, String? domain, bool? secure, bool httpOnly = true, bool raw = false, String? sameSite});
|
|
||||||
|
|
||||||
/// Expire the given cookie.
|
|
||||||
///
|
|
||||||
/// @param String name
|
|
||||||
/// @param String? path
|
|
||||||
/// @param String? domain
|
|
||||||
/// @return Cookie
|
|
||||||
Cookie forget(String name, {String? path, String? domain});
|
|
||||||
}
|
|
|
@ -1,12 +0,0 @@
|
||||||
import 'factory.dart';
|
|
||||||
|
|
||||||
abstract class QueueingFactory extends Factory {
|
|
||||||
/// Queue a cookie to send with the next response.
|
|
||||||
void queue(List<dynamic> parameters);
|
|
||||||
|
|
||||||
/// Remove a cookie from the queue.
|
|
||||||
void unqueue(String name, [String? path]);
|
|
||||||
|
|
||||||
/// Get the cookies which have been queued for the next request.
|
|
||||||
List<Map<String, dynamic>> getQueuedCookies();
|
|
||||||
}
|
|
|
@ -1,9 +0,0 @@
|
||||||
import 'package:illuminate_database/eloquent/builder.dart';
|
|
||||||
import 'package:illuminate_database/query/builder.dart' as BaseContract;
|
|
||||||
|
|
||||||
/// This interface is intentionally empty and exists to improve IDE support.
|
|
||||||
///
|
|
||||||
/// @mixin Illuminate\Database\Eloquent\Builder
|
|
||||||
abstract class Builder implements BaseContract {
|
|
||||||
// Intentionally left empty
|
|
||||||
}
|
|
|
@ -1,7 +0,0 @@
|
||||||
abstract class Castable {
|
|
||||||
/// Get the name of the caster class to use when casting from / to this cast target.
|
|
||||||
///
|
|
||||||
/// @param List arguments
|
|
||||||
/// @return Type
|
|
||||||
static Type castUsing(List arguments);
|
|
||||||
}
|
|
|
@ -1,30 +0,0 @@
|
||||||
import 'model.dart';
|
|
||||||
|
|
||||||
/// A generic type parameter for the get method.
|
|
||||||
typedef TGet = dynamic;
|
|
||||||
|
|
||||||
/// A generic type parameter for the set method.
|
|
||||||
typedef TSet = dynamic;
|
|
||||||
|
|
||||||
/// An abstract class representing a contract for casting attributes.
|
|
||||||
abstract class CastsAttributes {
|
|
||||||
/// Transforms the attribute from the underlying model values.
|
|
||||||
///
|
|
||||||
/// [model] - The model instance.
|
|
||||||
/// [key] - The attribute key.
|
|
||||||
/// [value] - The attribute value.
|
|
||||||
/// [attributes] - The attributes array.
|
|
||||||
///
|
|
||||||
/// Returns the transformed attribute value.
|
|
||||||
TGet? get(Model model, String key, dynamic value, Map<String, dynamic> attributes);
|
|
||||||
|
|
||||||
/// Transforms the attribute to its underlying model values.
|
|
||||||
///
|
|
||||||
/// [model] - The model instance.
|
|
||||||
/// [key] - The attribute key.
|
|
||||||
/// [value] - The attribute value to be set.
|
|
||||||
/// [attributes] - The attributes array.
|
|
||||||
///
|
|
||||||
/// Returns the transformed attribute value.
|
|
||||||
dynamic set(Model model, String key, TSet? value, Map<String, dynamic> attributes);
|
|
||||||
}
|
|
|
@ -1,12 +0,0 @@
|
||||||
import 'package:your_package/database/model.dart';
|
|
||||||
|
|
||||||
abstract class CastsInboundAttributes {
|
|
||||||
/// Transform the attribute to its underlying model values.
|
|
||||||
///
|
|
||||||
/// @param Model model
|
|
||||||
/// @param String key
|
|
||||||
/// @param dynamic value
|
|
||||||
/// @param Map<String, dynamic> attributes
|
|
||||||
/// @return dynamic
|
|
||||||
dynamic set(Model model, String key, dynamic value, Map<String, dynamic> attributes);
|
|
||||||
}
|
|
|
@ -1,19 +0,0 @@
|
||||||
abstract class DeviatesCastableAttributes {
|
|
||||||
/// Increment the attribute.
|
|
||||||
///
|
|
||||||
/// @param Model model
|
|
||||||
/// @param String key
|
|
||||||
/// @param dynamic value
|
|
||||||
/// @param Map<String, dynamic> attributes
|
|
||||||
/// @return dynamic
|
|
||||||
dynamic increment(Model model, String key, dynamic value, Map<String, dynamic> attributes);
|
|
||||||
|
|
||||||
/// Decrement the attribute.
|
|
||||||
///
|
|
||||||
/// @param Model model
|
|
||||||
/// @param String key
|
|
||||||
/// @param dynamic value
|
|
||||||
/// @param Map<String, dynamic> attributes
|
|
||||||
/// @return dynamic
|
|
||||||
dynamic decrement(Model model, String key, dynamic value, Map<String, dynamic> attributes);
|
|
||||||
}
|
|
|
@ -1,12 +0,0 @@
|
||||||
import 'package:your_package_name/eloquent/model.dart';
|
|
||||||
|
|
||||||
abstract class SerializesCastableAttributes {
|
|
||||||
/// Serialize the attribute when converting the model to an array.
|
|
||||||
///
|
|
||||||
/// @param \Illuminate\Database\Eloquent\Model $model
|
|
||||||
/// @param string $key
|
|
||||||
/// @param mixed $value
|
|
||||||
/// @param array $attributes
|
|
||||||
/// @return mixed
|
|
||||||
dynamic serialize(Model model, String key, dynamic value, Map<String, dynamic> attributes);
|
|
||||||
}
|
|
|
@ -1,24 +0,0 @@
|
||||||
abstract class SupportsPartialRelations {
|
|
||||||
/// Indicate that the relation is a single result of a larger one-to-many relationship.
|
|
||||||
///
|
|
||||||
/// [column] is the column to aggregate, defaults to 'id'.
|
|
||||||
/// [aggregate] is the aggregate function, defaults to 'MAX'.
|
|
||||||
/// [relation] is the relation name.
|
|
||||||
///
|
|
||||||
/// Returns the instance of the class.
|
|
||||||
SupportsPartialRelations ofMany(
|
|
||||||
String? column = 'id',
|
|
||||||
dynamic aggregate = 'MAX',
|
|
||||||
String? relation,
|
|
||||||
);
|
|
||||||
|
|
||||||
/// Determine whether the relationship is a one-of-many relationship.
|
|
||||||
///
|
|
||||||
/// Returns a boolean value indicating whether the relationship is one-of-many.
|
|
||||||
bool isOneOfMany();
|
|
||||||
|
|
||||||
/// Get the one of many inner join subselect query builder instance.
|
|
||||||
///
|
|
||||||
/// Returns an instance of the query builder or null.
|
|
||||||
dynamic getOneOfManySubQuery();
|
|
||||||
}
|
|
|
@ -1,4 +0,0 @@
|
||||||
|
|
||||||
abstract class MigrationEvent {
|
|
||||||
// Add any common functionality or properties if needed
|
|
||||||
}
|
|
|
@ -1,32 +0,0 @@
|
||||||
class ModelIdentifier {
|
|
||||||
/// The class name of the model.
|
|
||||||
final String className;
|
|
||||||
|
|
||||||
/// The unique identifier of the model.
|
|
||||||
///
|
|
||||||
/// This may be either a single ID or an array of IDs.
|
|
||||||
final dynamic id;
|
|
||||||
|
|
||||||
/// The relationships loaded on the model.
|
|
||||||
final List<dynamic> relations;
|
|
||||||
|
|
||||||
/// The connection name of the model.
|
|
||||||
final String? connection;
|
|
||||||
|
|
||||||
/// The class name of the model collection.
|
|
||||||
String? collectionClass;
|
|
||||||
|
|
||||||
/// Create a new model identifier.
|
|
||||||
ModelIdentifier({
|
|
||||||
required this.className,
|
|
||||||
required this.id,
|
|
||||||
required this.relations,
|
|
||||||
this.connection,
|
|
||||||
});
|
|
||||||
|
|
||||||
/// Specify the collection class that should be used when serializing / restoring collections.
|
|
||||||
ModelIdentifier useCollectionClass(String? collectionClass) {
|
|
||||||
this.collectionClass = collectionClass;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,8 +0,0 @@
|
||||||
//import 'package:laravel_framework/database/query/builder.dart';
|
|
||||||
|
|
||||||
/// This interface is intentionally empty and exists to improve IDE support.
|
|
||||||
///
|
|
||||||
/// @mixin Builder
|
|
||||||
abstract class Builder {
|
|
||||||
// This is intentionally left empty to match the PHP interface.
|
|
||||||
}
|
|
|
@ -1,6 +0,0 @@
|
||||||
// lib/Illuminate/Contracts/Database/Query/ConditionExpression.dart
|
|
||||||
|
|
||||||
import 'expression.dart';
|
|
||||||
|
|
||||||
abstract class ConditionExpression implements Expression {
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
// File path: lib/Illuminate/Contracts/Database/Query/expression.dart
|
|
||||||
|
|
||||||
import 'package:your_project/Illuminate/Database/grammar.dart';
|
|
||||||
|
|
||||||
abstract class Expression {
|
|
||||||
/// Get the value of the expression.
|
|
||||||
///
|
|
||||||
/// @param Grammar grammar
|
|
||||||
/// @return String|int|double
|
|
||||||
dynamic getValue(Grammar grammar);
|
|
||||||
}
|
|
|
@ -1,49 +0,0 @@
|
||||||
import 'dart:async';
|
|
||||||
|
|
||||||
// TODO: Replace custom classes with dart equivalents.
|
|
||||||
|
|
||||||
abstract class ExceptionHandler {
|
|
||||||
/// Report or log an exception.
|
|
||||||
///
|
|
||||||
/// @param Throwable e
|
|
||||||
/// @return void
|
|
||||||
///
|
|
||||||
/// @throws Throwable
|
|
||||||
Future<void> report(Exception e);
|
|
||||||
|
|
||||||
/// Determine if the exception should be reported.
|
|
||||||
///
|
|
||||||
/// @param Throwable e
|
|
||||||
/// @return bool
|
|
||||||
bool shouldReport(Exception e);
|
|
||||||
|
|
||||||
/// Render an exception into an HTTP response.
|
|
||||||
///
|
|
||||||
/// @param Request request
|
|
||||||
/// @param Throwable e
|
|
||||||
/// @return Response
|
|
||||||
///
|
|
||||||
/// @throws Throwable
|
|
||||||
Future<Response> render(Request request, Exception e);
|
|
||||||
|
|
||||||
/// Render an exception to the console.
|
|
||||||
///
|
|
||||||
/// @param OutputInterface output
|
|
||||||
/// @param Throwable e
|
|
||||||
/// @return void
|
|
||||||
///
|
|
||||||
/// @internal This method is not meant to be used or overwritten outside the framework.
|
|
||||||
void renderForConsole(OutputInterface output, Exception e);
|
|
||||||
}
|
|
||||||
|
|
||||||
class Request {
|
|
||||||
// Add your request properties and methods here.
|
|
||||||
}
|
|
||||||
|
|
||||||
class Response {
|
|
||||||
// Add your response properties and methods here.
|
|
||||||
}
|
|
||||||
|
|
||||||
class OutputInterface {
|
|
||||||
// Add your output interface properties and methods here.
|
|
||||||
}
|
|
|
@ -1,12 +0,0 @@
|
||||||
import 'dart:core';
|
|
||||||
|
|
||||||
class DecryptException implements Exception {
|
|
||||||
final String message;
|
|
||||||
|
|
||||||
DecryptException([this.message = '']);
|
|
||||||
|
|
||||||
@override
|
|
||||||
String toString() {
|
|
||||||
return message.isEmpty ? 'DecryptException' : 'DecryptException: $message';
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,9 +0,0 @@
|
||||||
|
|
||||||
class EncryptException implements Exception {
|
|
||||||
final String message;
|
|
||||||
|
|
||||||
EncryptException([this.message = '']);
|
|
||||||
|
|
||||||
@override
|
|
||||||
String toString() => 'EncryptException: $message';
|
|
||||||
}
|
|
|
@ -1,34 +0,0 @@
|
||||||
import 'dart:async';
|
|
||||||
|
|
||||||
abstract class Encrypter {
|
|
||||||
/// Encrypt the given value.
|
|
||||||
///
|
|
||||||
/// [value]: The value to be encrypted.
|
|
||||||
/// [serialize]: Whether to serialize the value before encryption.
|
|
||||||
/// Returns a string representing the encrypted value.
|
|
||||||
/// Throws an EncryptException if encryption fails.
|
|
||||||
Future<String> encrypt(dynamic value, {bool serialize = true});
|
|
||||||
|
|
||||||
/// Decrypt the given value.
|
|
||||||
///
|
|
||||||
/// [payload]: The encrypted payload to be decrypted.
|
|
||||||
/// [unserialize]: Whether to unserialize the value after decryption.
|
|
||||||
/// Returns the decrypted value.
|
|
||||||
/// Throws a DecryptException if decryption fails.
|
|
||||||
Future<dynamic> decrypt(String payload, {bool unserialize = true});
|
|
||||||
|
|
||||||
/// Get the encryption key that the encrypter is currently using.
|
|
||||||
///
|
|
||||||
/// Returns the current encryption key as a string.
|
|
||||||
String getKey();
|
|
||||||
|
|
||||||
/// Get the current encryption key and all previous encryption keys.
|
|
||||||
///
|
|
||||||
/// Returns a list of all encryption keys.
|
|
||||||
List<String> getAllKeys();
|
|
||||||
|
|
||||||
/// Get the previous encryption keys.
|
|
||||||
///
|
|
||||||
/// Returns a list of previous encryption keys.
|
|
||||||
List<String> getPreviousKeys();
|
|
||||||
}
|
|
|
@ -1,18 +0,0 @@
|
||||||
|
|
||||||
abstract class StringEncrypter {
|
|
||||||
/// Encrypt a string without serialization.
|
|
||||||
///
|
|
||||||
/// @param String value
|
|
||||||
/// @return String
|
|
||||||
///
|
|
||||||
/// @throws EncryptException
|
|
||||||
String encryptString(String value);
|
|
||||||
|
|
||||||
/// Decrypt the given string without unserialization.
|
|
||||||
///
|
|
||||||
/// @param String payload
|
|
||||||
/// @return String
|
|
||||||
///
|
|
||||||
/// @throws DecryptException
|
|
||||||
String decryptString(String payload);
|
|
||||||
}
|
|
|
@ -1,59 +0,0 @@
|
||||||
abstract class Dispatcher {
|
|
||||||
/// Register an event listener with the dispatcher.
|
|
||||||
///
|
|
||||||
/// @param Closure|string|array events
|
|
||||||
/// @param Closure|string|array|null listener
|
|
||||||
/// @return void
|
|
||||||
void listen(dynamic events, [dynamic listener]);
|
|
||||||
|
|
||||||
/// Determine if a given event has listeners.
|
|
||||||
///
|
|
||||||
/// @param string eventName
|
|
||||||
/// @return bool
|
|
||||||
bool hasListeners(String eventName);
|
|
||||||
|
|
||||||
/// Register an event subscriber with the dispatcher.
|
|
||||||
///
|
|
||||||
/// @param object|string subscriber
|
|
||||||
/// @return void
|
|
||||||
void subscribe(dynamic subscriber);
|
|
||||||
|
|
||||||
/// Dispatch an event until the first non-null response is returned.
|
|
||||||
///
|
|
||||||
/// @param string|object event
|
|
||||||
/// @param mixed payload
|
|
||||||
/// @return mixed
|
|
||||||
dynamic until(dynamic event, [dynamic payload]);
|
|
||||||
|
|
||||||
/// Dispatch an event and call the listeners.
|
|
||||||
///
|
|
||||||
/// @param string|object event
|
|
||||||
/// @param mixed payload
|
|
||||||
/// @param bool halt
|
|
||||||
/// @return List<dynamic>|null
|
|
||||||
List<dynamic>? dispatch(dynamic event, [dynamic payload, bool halt = false]);
|
|
||||||
|
|
||||||
/// Register an event and payload to be fired later.
|
|
||||||
///
|
|
||||||
/// @param string event
|
|
||||||
/// @param array payload
|
|
||||||
/// @return void
|
|
||||||
void push(String event, [List<dynamic>? payload]);
|
|
||||||
|
|
||||||
/// Flush a set of pushed events.
|
|
||||||
///
|
|
||||||
/// @param string event
|
|
||||||
/// @return void
|
|
||||||
void flush(String event);
|
|
||||||
|
|
||||||
/// Remove a set of listeners from the dispatcher.
|
|
||||||
///
|
|
||||||
/// @param string event
|
|
||||||
/// @return void
|
|
||||||
void forget(String event);
|
|
||||||
|
|
||||||
/// Forget all of the queued listeners.
|
|
||||||
///
|
|
||||||
/// @return void
|
|
||||||
void forgetPushed();
|
|
||||||
}
|
|
|
@ -1,3 +0,0 @@
|
||||||
abstract class ShouldDispatchAfterCommit {
|
|
||||||
// Interface with no methods
|
|
||||||
}
|
|
|
@ -1,4 +0,0 @@
|
||||||
|
|
||||||
abstract class ShouldHandleEventsAfterCommit {
|
|
||||||
// Add any method signatures if needed in the future
|
|
||||||
}
|
|
|
@ -1,8 +0,0 @@
|
||||||
import 'filesystem.dart';
|
|
||||||
abstract class Cloud implements Filesystem {
|
|
||||||
/// Get the URL for the file at the given path.
|
|
||||||
///
|
|
||||||
/// @param String path
|
|
||||||
/// @return String
|
|
||||||
String url(String path);
|
|
||||||
}
|
|
|
@ -1,9 +0,0 @@
|
||||||
import 'filesystem.dart';
|
|
||||||
|
|
||||||
abstract class Factory {
|
|
||||||
/// Get a filesystem implementation.
|
|
||||||
///
|
|
||||||
/// @param String? name
|
|
||||||
/// @return Filesystem
|
|
||||||
Filesystem disk([String? name]);
|
|
||||||
}
|
|
|
@ -1,9 +0,0 @@
|
||||||
|
|
||||||
class FileNotFoundException implements Exception {
|
|
||||||
final String message;
|
|
||||||
|
|
||||||
FileNotFoundException([this.message = 'File not found']);
|
|
||||||
|
|
||||||
@override
|
|
||||||
String toString() => 'FileNotFoundException: $message';
|
|
||||||
}
|
|
|
@ -1,164 +0,0 @@
|
||||||
import 'dart:typed_data';
|
|
||||||
import 'dart:io';
|
|
||||||
|
|
||||||
abstract class Filesystem {
|
|
||||||
/// The public visibility setting.
|
|
||||||
static const String VISIBILITY_PUBLIC = 'public';
|
|
||||||
|
|
||||||
/// The private visibility setting.
|
|
||||||
static const String VISIBILITY_PRIVATE = 'private';
|
|
||||||
|
|
||||||
/// Get the full path to the file that exists at the given relative path.
|
|
||||||
///
|
|
||||||
/// @param String path
|
|
||||||
/// @return String
|
|
||||||
String path(String path);
|
|
||||||
|
|
||||||
/// Determine if a file exists.
|
|
||||||
///
|
|
||||||
/// @param String path
|
|
||||||
/// @return bool
|
|
||||||
bool exists(String path);
|
|
||||||
|
|
||||||
/// Get the contents of a file.
|
|
||||||
///
|
|
||||||
/// @param String path
|
|
||||||
/// @return Uint8List? (null if file doesn't exist)
|
|
||||||
Uint8List? get(String path);
|
|
||||||
|
|
||||||
/// Get a resource to read the file.
|
|
||||||
///
|
|
||||||
/// @param String path
|
|
||||||
/// @return Stream<List<int>>? (null if file doesn't exist)
|
|
||||||
Stream<List<int>>? readStream(String path);
|
|
||||||
|
|
||||||
/// Write the contents of a file.
|
|
||||||
///
|
|
||||||
/// @param String path
|
|
||||||
/// @param dynamic contents
|
|
||||||
/// @param Map<String, dynamic>? options
|
|
||||||
/// @return bool
|
|
||||||
bool put(String path, dynamic contents, [Map<String, dynamic>? options]);
|
|
||||||
|
|
||||||
/// Store the uploaded file on the disk.
|
|
||||||
///
|
|
||||||
/// @param String path
|
|
||||||
/// @param dynamic file
|
|
||||||
/// @param Map<String, dynamic>? options
|
|
||||||
/// @return String|false
|
|
||||||
dynamic putFile(String path, dynamic file, [Map<String, dynamic>? options]);
|
|
||||||
|
|
||||||
/// Store the uploaded file on the disk with a given name.
|
|
||||||
///
|
|
||||||
/// @param String path
|
|
||||||
/// @param dynamic file
|
|
||||||
/// @param String? name
|
|
||||||
/// @param Map<String, dynamic>? options
|
|
||||||
/// @return String|false
|
|
||||||
dynamic putFileAs(String path, dynamic file, [String? name, Map<String, dynamic>? options]);
|
|
||||||
|
|
||||||
/// Write a new file using a stream.
|
|
||||||
///
|
|
||||||
/// @param String path
|
|
||||||
/// @param Stream<List<int>> resource
|
|
||||||
/// @param Map<String, dynamic>? options
|
|
||||||
/// @return bool
|
|
||||||
bool writeStream(String path, Stream<List<int>> resource, [Map<String, dynamic>? options]);
|
|
||||||
|
|
||||||
/// Get the visibility for the given path.
|
|
||||||
///
|
|
||||||
/// @param String path
|
|
||||||
/// @return String
|
|
||||||
String getVisibility(String path);
|
|
||||||
|
|
||||||
/// Set the visibility for the given path.
|
|
||||||
///
|
|
||||||
/// @param String path
|
|
||||||
/// @param String visibility
|
|
||||||
/// @return bool
|
|
||||||
bool setVisibility(String path, String visibility);
|
|
||||||
|
|
||||||
/// Prepend to a file.
|
|
||||||
///
|
|
||||||
/// @param String path
|
|
||||||
/// @param String data
|
|
||||||
/// @return bool
|
|
||||||
bool prepend(String path, String data);
|
|
||||||
|
|
||||||
/// Append to a file.
|
|
||||||
///
|
|
||||||
/// @param String path
|
|
||||||
/// @param String data
|
|
||||||
/// @return bool
|
|
||||||
bool append(String path, String data);
|
|
||||||
|
|
||||||
/// Delete the file at a given path.
|
|
||||||
///
|
|
||||||
/// @param dynamic paths
|
|
||||||
/// @return bool
|
|
||||||
bool delete(dynamic paths);
|
|
||||||
|
|
||||||
/// Copy a file to a new location.
|
|
||||||
///
|
|
||||||
/// @param String from
|
|
||||||
/// @param String to
|
|
||||||
/// @return bool
|
|
||||||
bool copy(String from, String to);
|
|
||||||
|
|
||||||
/// Move a file to a new location.
|
|
||||||
///
|
|
||||||
/// @param String from
|
|
||||||
/// @param String to
|
|
||||||
/// @return bool
|
|
||||||
bool move(String from, String to);
|
|
||||||
|
|
||||||
/// Get the file size of a given file.
|
|
||||||
///
|
|
||||||
/// @param String path
|
|
||||||
/// @return int
|
|
||||||
int size(String path);
|
|
||||||
|
|
||||||
/// Get the file's last modification time.
|
|
||||||
///
|
|
||||||
/// @param String path
|
|
||||||
/// @return DateTime
|
|
||||||
DateTime lastModified(String path);
|
|
||||||
|
|
||||||
/// Get an array of all files in a directory.
|
|
||||||
///
|
|
||||||
/// @param String? directory
|
|
||||||
/// @param bool recursive
|
|
||||||
/// @return List<String>
|
|
||||||
List<String> files([String? directory, bool recursive = false]);
|
|
||||||
|
|
||||||
/// Get all of the files from the given directory (recursive).
|
|
||||||
///
|
|
||||||
/// @param String? directory
|
|
||||||
/// @return List<String>
|
|
||||||
List<String> allFiles([String? directory]);
|
|
||||||
|
|
||||||
/// Get all of the directories within a given directory.
|
|
||||||
///
|
|
||||||
/// @param String? directory
|
|
||||||
/// @param bool recursive
|
|
||||||
/// @return List<String>
|
|
||||||
List<String> directories([String? directory, bool recursive = false]);
|
|
||||||
|
|
||||||
/// Get all (recursive) of the directories within a given directory.
|
|
||||||
///
|
|
||||||
/// @param String? directory
|
|
||||||
/// @return List<String>
|
|
||||||
List<String> allDirectories([String? directory]);
|
|
||||||
|
|
||||||
/// Create a directory.
|
|
||||||
///
|
|
||||||
/// @param String path
|
|
||||||
/// @return bool
|
|
||||||
bool makeDirectory(String path);
|
|
||||||
|
|
||||||
/// Recursively delete a directory.
|
|
||||||
///
|
|
||||||
/// @param String directory
|
|
||||||
/// @return bool
|
|
||||||
bool deleteDirectory(String directory);
|
|
||||||
}
|
|
|
@ -1,12 +0,0 @@
|
||||||
import 'dart:io';
|
|
||||||
|
|
||||||
class LockTimeoutException implements IOException {
|
|
||||||
final String message;
|
|
||||||
|
|
||||||
LockTimeoutException([this.message = '']);
|
|
||||||
|
|
||||||
@override
|
|
||||||
String toString() {
|
|
||||||
return 'LockTimeoutException: $message';
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,102 +0,0 @@
|
||||||
import 'container.dart'; // Assuming Container is defined in container.dart
|
|
||||||
import 'maintenance_mode.dart'; // Assuming MaintenanceMode is defined in maintenance_mode.dart
|
|
||||||
|
|
||||||
// TODO: Replace missing imports with dar equivalents.
|
|
||||||
|
|
||||||
abstract class Application extends Container {
|
|
||||||
/// Get the version number of the application.
|
|
||||||
String version();
|
|
||||||
|
|
||||||
/// Get the base path of the installation.
|
|
||||||
String basePath([String path = '']);
|
|
||||||
|
|
||||||
/// Get the path to the bootstrap directory.
|
|
||||||
String bootstrapPath([String path = '']);
|
|
||||||
|
|
||||||
/// Get the path to the application configuration files.
|
|
||||||
String configPath([String path = '']);
|
|
||||||
|
|
||||||
/// Get the path to the database directory.
|
|
||||||
String databasePath([String path = '']);
|
|
||||||
|
|
||||||
/// Get the path to the language files.
|
|
||||||
String langPath([String path = '']);
|
|
||||||
|
|
||||||
/// Get the path to the public directory.
|
|
||||||
String publicPath([String path = '']);
|
|
||||||
|
|
||||||
/// Get the path to the resources directory.
|
|
||||||
String resourcePath([String path = '']);
|
|
||||||
|
|
||||||
/// Get the path to the storage directory.
|
|
||||||
String storagePath([String path = '']);
|
|
||||||
|
|
||||||
/// Get or check the current application environment.
|
|
||||||
dynamic environment(List<String> environments);
|
|
||||||
|
|
||||||
/// Determine if the application is running in the console.
|
|
||||||
bool runningInConsole();
|
|
||||||
|
|
||||||
/// Determine if the application is running unit tests.
|
|
||||||
bool runningUnitTests();
|
|
||||||
|
|
||||||
/// Determine if the application is running with debug mode enabled.
|
|
||||||
bool hasDebugModeEnabled();
|
|
||||||
|
|
||||||
/// Get an instance of the maintenance mode manager implementation.
|
|
||||||
MaintenanceMode maintenanceMode();
|
|
||||||
|
|
||||||
/// Determine if the application is currently down for maintenance.
|
|
||||||
bool isDownForMaintenance();
|
|
||||||
|
|
||||||
/// Register all of the configured providers.
|
|
||||||
void registerConfiguredProviders();
|
|
||||||
|
|
||||||
/// Register a service provider with the application.
|
|
||||||
ServiceProvider register(dynamic provider, [bool force = false]);
|
|
||||||
|
|
||||||
/// Register a deferred provider and service.
|
|
||||||
void registerDeferredProvider(String provider, [String? service]);
|
|
||||||
|
|
||||||
/// Resolve a service provider instance from the class name.
|
|
||||||
ServiceProvider resolveProvider(String provider);
|
|
||||||
|
|
||||||
/// Boot the application's service providers.
|
|
||||||
void boot();
|
|
||||||
|
|
||||||
/// Register a new boot listener.
|
|
||||||
void booting(Function callback);
|
|
||||||
|
|
||||||
/// Register a new "booted" listener.
|
|
||||||
void booted(Function callback);
|
|
||||||
|
|
||||||
/// Run the given array of bootstrap classes.
|
|
||||||
void bootstrapWith(List<String> bootstrappers);
|
|
||||||
|
|
||||||
/// Get the current application locale.
|
|
||||||
String getLocale();
|
|
||||||
|
|
||||||
/// Get the application namespace.
|
|
||||||
String getNamespace();
|
|
||||||
|
|
||||||
/// Get the registered service provider instances if any exist.
|
|
||||||
List<ServiceProvider> getProviders(dynamic provider);
|
|
||||||
|
|
||||||
/// Determine if the application has been bootstrapped before.
|
|
||||||
bool hasBeenBootstrapped();
|
|
||||||
|
|
||||||
/// Load and boot all of the remaining deferred providers.
|
|
||||||
void loadDeferredProviders();
|
|
||||||
|
|
||||||
/// Set the current application locale.
|
|
||||||
void setLocale(String locale);
|
|
||||||
|
|
||||||
/// Determine if middleware has been disabled for the application.
|
|
||||||
bool shouldSkipMiddleware();
|
|
||||||
|
|
||||||
/// Register a terminating callback with the application.
|
|
||||||
Application terminating(dynamic callback);
|
|
||||||
|
|
||||||
/// Terminate the application.
|
|
||||||
void terminate();
|
|
||||||
}
|
|
|
@ -1,17 +0,0 @@
|
||||||
|
|
||||||
abstract class CachesConfiguration {
|
|
||||||
/// Determine if the application configuration is cached.
|
|
||||||
///
|
|
||||||
/// Returns a boolean indicating if the configuration is cached.
|
|
||||||
bool configurationIsCached();
|
|
||||||
|
|
||||||
/// Get the path to the configuration cache file.
|
|
||||||
///
|
|
||||||
/// Returns a string representing the path to the configuration cache file.
|
|
||||||
String getCachedConfigPath();
|
|
||||||
|
|
||||||
/// Get the path to the cached services file.
|
|
||||||
///
|
|
||||||
/// Returns a string representing the path to the cached services file.
|
|
||||||
String getCachedServicesPath();
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
abstract class CachesRoutes {
|
|
||||||
/// Determine if the application routes are cached.
|
|
||||||
///
|
|
||||||
/// @return bool
|
|
||||||
bool routesAreCached();
|
|
||||||
|
|
||||||
/// Get the path to the routes cache file.
|
|
||||||
///
|
|
||||||
/// @return string
|
|
||||||
String getCachedRoutesPath();
|
|
||||||
}
|
|
|
@ -1,7 +0,0 @@
|
||||||
abstract class ExceptionRenderer {
|
|
||||||
/// Renders the given exception as HTML.
|
|
||||||
///
|
|
||||||
/// @param Exception throwable
|
|
||||||
/// @return String
|
|
||||||
String render(Exception throwable);
|
|
||||||
}
|
|
|
@ -1,19 +0,0 @@
|
||||||
abstract class MaintenanceMode {
|
|
||||||
/// Take the application down for maintenance.
|
|
||||||
///
|
|
||||||
/// [payload] - The payload containing maintenance details.
|
|
||||||
void activate(Map<String, dynamic> payload);
|
|
||||||
|
|
||||||
/// Take the application out of maintenance.
|
|
||||||
void deactivate();
|
|
||||||
|
|
||||||
/// Determine if the application is currently down for maintenance.
|
|
||||||
///
|
|
||||||
/// Returns `true` if the application is in maintenance mode, `false` otherwise.
|
|
||||||
bool active();
|
|
||||||
|
|
||||||
/// Get the data map which was provided when the application was placed into maintenance.
|
|
||||||
///
|
|
||||||
/// Returns a map containing maintenance data.
|
|
||||||
Map<String, dynamic> data();
|
|
||||||
}
|
|
|
@ -1,29 +0,0 @@
|
||||||
abstract class Hasher {
|
|
||||||
/// Get information about the given hashed value.
|
|
||||||
///
|
|
||||||
/// @param String hashedValue
|
|
||||||
/// @return Map<String, dynamic>
|
|
||||||
Map<String, dynamic> info(String hashedValue);
|
|
||||||
|
|
||||||
/// Hash the given value.
|
|
||||||
///
|
|
||||||
/// @param String value
|
|
||||||
/// @param Map<String, dynamic> options
|
|
||||||
/// @return String
|
|
||||||
String make(String value, {Map<String, dynamic> options = const {}});
|
|
||||||
|
|
||||||
/// Check the given plain value against a hash.
|
|
||||||
///
|
|
||||||
/// @param String value
|
|
||||||
/// @param String hashedValue
|
|
||||||
/// @param Map<String, dynamic> options
|
|
||||||
/// @return bool
|
|
||||||
bool check(String value, String hashedValue, {Map<String, dynamic> options = const {}});
|
|
||||||
|
|
||||||
/// Check if the given hash has been hashed using the given options.
|
|
||||||
///
|
|
||||||
/// @param String hashedValue
|
|
||||||
/// @param Map<String, dynamic> options
|
|
||||||
/// @return bool
|
|
||||||
bool needsRehash(String hashedValue, {Map<String, dynamic> options = const {}});
|
|
||||||
}
|
|
|
@ -1,26 +0,0 @@
|
||||||
import 'package:symfony_http/symfony_http.dart' as symfony;
|
|
||||||
import 'package:illuminate_foundation/illuminate_foundation.dart';
|
|
||||||
|
|
||||||
// TODO: Find replacements for missing imports.
|
|
||||||
|
|
||||||
abstract class Kernel {
|
|
||||||
/// Bootstrap the application for HTTP requests.
|
|
||||||
void bootstrap();
|
|
||||||
|
|
||||||
/// Handle an incoming HTTP request.
|
|
||||||
///
|
|
||||||
/// @param symfony.Request request
|
|
||||||
/// @return symfony.Response
|
|
||||||
symfony.Response handle(symfony.Request request);
|
|
||||||
|
|
||||||
/// Perform any final actions for the request lifecycle.
|
|
||||||
///
|
|
||||||
/// @param symfony.Request request
|
|
||||||
/// @param symfony.Response response
|
|
||||||
void terminate(symfony.Request request, symfony.Response response);
|
|
||||||
|
|
||||||
/// Get the application instance.
|
|
||||||
///
|
|
||||||
/// @return Application
|
|
||||||
Application getApplication();
|
|
||||||
}
|
|
|
@ -1,10 +0,0 @@
|
||||||
import 'package:your_project/attachment.dart';
|
|
||||||
|
|
||||||
// TODO: Check imports
|
|
||||||
|
|
||||||
abstract class Attachable {
|
|
||||||
/// Get an attachment instance for this entity.
|
|
||||||
///
|
|
||||||
/// @return Attachment
|
|
||||||
Attachment toMailAttachment();
|
|
||||||
}
|
|
|
@ -1,10 +0,0 @@
|
||||||
// import statements for required packages
|
|
||||||
import 'mailer.dart';
|
|
||||||
|
|
||||||
abstract class Factory {
|
|
||||||
/// Get a mailer instance by name.
|
|
||||||
///
|
|
||||||
/// @param [name] The name of the mailer instance.
|
|
||||||
/// @return An instance of [Mailer].
|
|
||||||
Mailer mailer([String? name]);
|
|
||||||
}
|
|
|
@ -1,20 +0,0 @@
|
||||||
// Import necessary libraries
|
|
||||||
import 'dart:async';
|
|
||||||
|
|
||||||
/// Represents the MailQueue interface.
|
|
||||||
abstract class MailQueue {
|
|
||||||
/// Queues a new e-mail message for sending.
|
|
||||||
///
|
|
||||||
/// [view] can be a Mailable, String, or List.
|
|
||||||
/// [queue] is the optional queue name.
|
|
||||||
/// Returns a Future representing the queued result.
|
|
||||||
Future<dynamic> queue(dynamic view, {String? queue});
|
|
||||||
|
|
||||||
/// Queues a new e-mail message for sending after [delay].
|
|
||||||
///
|
|
||||||
/// [delay] can be a Duration, int (in seconds), or DateTime.
|
|
||||||
/// [view] can be a Mailable, String, or List.
|
|
||||||
/// [queue] is the optional queue name.
|
|
||||||
/// Returns a Future representing the queued result.
|
|
||||||
Future<dynamic> later(dynamic delay, dynamic view, {String? queue});
|
|
||||||
}
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue