Skip to content

Commit

Permalink
Add back @public
Browse files Browse the repository at this point in the history
  • Loading branch information
dnys1 committed Mar 8, 2024
1 parent fdf4070 commit 2726410
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions packages/celest/lib/src/grants/grants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,23 @@ import 'package:celest/src/core/entity.dart';
/// ```
const authenticated = _Authenticated();

/// A grant which provides access to everyone.
///
/// **NOTE**: Using this grant on a function or library will make it accessible
/// to the public internet. Anyone will be able to call the functions.
///
/// ## Example
///
/// ```dart
/// import 'package:celest/celest.dart';
///
/// @public
/// Future<void> sayHello() async {
/// print('Hello, stranger!');
/// }
/// ```
const public = _Public();

final class _Role implements Entity {
const _Role({
required this.name,
Expand All @@ -38,3 +55,7 @@ final class _Grant {
final class _Authenticated extends _Grant {
const _Authenticated() : super(to: const [_Role.authenticated]);
}

final class _Public {
const _Public();
}

0 comments on commit 2726410

Please sign in to comment.