pub type MigrationFn<T, S> = fn(OpenFgaServiceClient<T>, Option<String>, Option<String>, S) -> BoxFuture<'static, Result<(), StdError>>;Expand description
Possible function pointer that implements the migration function signature.
The arguments are:
- A client connected to endpoint that’s being migrated
- The id of the authorization model active prior to the invocation of the function
- The id of the authorization model active when the function is invoked
- The (user defined) state passed into the migration function
Authorization model ids may be undefined (None), e.g. for the pre hook of the first
migration neither a previous nor a current model exist. For the first migration run by
TupleModelManager::migrate, the previous model id is always None.