CliCommand

Enum CliCommand 

Source
pub enum CliCommand {
Show 14 variants Faker { count: u64, }, Fetch { uri: String, save: bool, fetch_as: Option<String>, }, Relay { action: RelayCommand, }, Count { likes: bool, shares: bool, replies: bool, }, Update { days: i64, limit: Option<u64>, }, Register { username: String, password: String, display_name: Option<String>, summary: Option<String>, avatar_url: Option<String>, banner_url: Option<String>, }, Reset { login: String, password: String, }, Nuke { for_real: bool, delete_objects: bool, }, Thread {}, Cloak { objects: bool, actors: bool, contents: bool, re_cloak: bool, }, FixActivities { likes: bool, announces: bool, }, Import { file: PathBuf, from: String, to: String, attachment_base: Option<String>, }, Export { actor: String, file: PathBuf, pretty: bool, }, Attachments {},
}

Variants§

§

Faker

generate fake user, note and activity

Fields

§count: u64

how many fake statuses to insert for root user

§

Fetch

fetch a single AP object

Fields

§uri: String

object id, or uri, to fetch

§save: bool

store fetched object in local db

§fetch_as: Option<String>

use this actor’s private key to fetch

§

Relay

act on remote relay actors at instance level

Fields

§action: RelayCommand

action to take against this relay

§

Count

recount object statistics

Fields

§likes: bool

fix likes counts for posts

§shares: bool

fix shares counts for posts

§replies: bool

fix replies counts for posts

§

Update

update remote actors

Fields

§days: i64

number of days after which actors should get updated

§limit: Option<u64>

stop after updating this many actors

§

Register

register a new local user

Fields

§username: String

username for new user, must be unique locally and cannot be changed

§password: String

password for new user

§display_name: Option<String>

display name for new user

§summary: Option<String>

summary text for new user

§avatar_url: Option<String>

url for avatar image of new user

§banner_url: Option<String>

url for banner image of new user

§

Reset

reset password of a user

Fields

§login: String

user login

§password: String

new password

§

Nuke

break all user relations so that instance can be shut down

Fields

§for_real: bool

unless this is set, nuke will be a dry run

§delete_objects: bool

also send Delete activities for all local objects

§

Thread

attempt to fix broken threads and completely gather their context

§

Cloak

replaces all attachment urls with proxied local versions (only useful for old instances)

Fields

§objects: bool

also cloak objects image urls

§actors: bool

also cloak actor images

§contents: bool

also replace urls inside post contents

§re_cloak: bool

also re-cloak already cloaked urls, useful if changing cloak secret

§

FixActivities

restore activities links, only needed for very old installs

Fields

§likes: bool

restore like activity links

§announces: bool

restore announces activity links

§

Import

import posts coming from another instance: replay them as local

Fields

§file: PathBuf

json backup file: must be an array of objects

§from: String

previous actor id, used in these posts

§to: String

current actor id, will be replaced in all posts

§attachment_base: Option<String>

base url where attachments are hosted now, if not given attachments will be kept unchanged

§

Export

export posts from a local actor as a json array, like an outbox

Fields

§actor: String

local username of actor to export

§file: PathBuf

json backup file: will be an array of objects

§pretty: bool

serialize json in human-readable form

§

Attachments

fix attachments types based on mediaType

Trait Implementations§

Source§

impl Clone for CliCommand

Source§

fn clone(&self) -> CliCommand

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CliCommand

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FromArgMatches for CliCommand

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

impl Subcommand for CliCommand

Source§

fn augment_subcommands<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
Source§

fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
Source§

fn has_subcommand(__clap_name: &str) -> bool

Test whether Self can parse a specific subcommand

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,