From 648bd59101f3411ccd9b926e08703f3b3af8d3e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Mikul=C3=A1=C5=A1ek?= Date: Sat, 7 May 2022 16:12:46 +0200 Subject: [PATCH] Reference for 0.0.2 --- REFERENCE.md | 153 +++++++++++++++++++++++++++++++-------------------- 1 file changed, 93 insertions(+), 60 deletions(-) diff --git a/REFERENCE.md b/REFERENCE.md index 744db14..acc7ed0 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -1,37 +1,38 @@ # Reference + ## Table of Contents -**Classes** +### Classes -_Public Classes_ +#### Public Classes * [`rclone`](#rclone): Download and install Rclone -_Private Classes_ +#### Private Classes * `rclone::install`: Ensures Rclone installed * `rclone::uninstall`: Removes rclone installed by this module -**Defined types** +### Defined types * [`rclone::config`](#rcloneconfig): General configuration for Rclone. * [`rclone::config::gdrive`](#rcloneconfiggdrive): Google Drive configuration for Rclone. * [`rclone::config::s3`](#rcloneconfigs3): S3 configuration for Rclone. -**Functions** +### Functions -_Public Functions_ +#### Public Functions -_Private Functions_ +#### Private Functions * `rclone::last_version`: Fetches the last released Rclone version from internet ## Classes -### rclone +### `rclone` Install rclone binary and man page @@ -45,19 +46,21 @@ include rclone #### Parameters -The following parameters are available in the `rclone` class. +The following parameters are available in the `rclone` class: + +* [`ensure`](#ensure) -##### `ensure` +##### `ensure` Data type: `Pattern[/absent/, /latest/, /\d+\.\d+\.\d+/]` installed version, can be 'latest', 'absent' or valid version string -Default value: 'latest' +Default value: `'latest'` ## Defined types -### rclone::config +### `rclone::config` Ensures Rclone configuration of given name, type and params. Include of `rclone` is required. @@ -75,23 +78,29 @@ rclone::config { 'my_remote': #### Parameters -The following parameters are available in the `rclone::config` defined type. +The following parameters are available in the `rclone::config` defined type: + +* [`ensure`](#ensure) +* [`os_user`](#os_user) +* [`type`](#type) +* [`options`](#options) +* [`config_name`](#config_name) -##### `ensure` +##### `ensure` Data type: `Enum['present', 'absent']` configuration ensure -Default value: 'present' +Default value: `'present'` -##### `os_user` +##### `os_user` Data type: `String` operating system user - used to execute rclone commands, effective configuration owner -##### `type` +##### `type` Data type: `Enum[ 'amazon cloud drive', @@ -132,21 +141,21 @@ Data type: `Enum[ configuration remote type -##### `options` +##### `options` Data type: `Hash[String, Optional[String]]` configuration options - Hash of options for `rclone config` command -##### `config_name` +##### `config_name` Data type: `String` configuration name - should be unique among Rclone configurations, defaults to title -Default value: $title +Default value: `$title` -### rclone::config::gdrive +### `rclone::config::gdrive` Ensures Drive Rclone configuration of given name and params. Include of `rclone` is required. Support only service account credentials (token authentication requires human interaction when setup). @@ -166,73 +175,83 @@ rclone::config::gdrive { 'drive_remote': #### Parameters -The following parameters are available in the `rclone::config::gdrive` defined type. +The following parameters are available in the `rclone::config::gdrive` defined type: -##### `ensure` +* [`ensure`](#ensure) +* [`os_user`](#os_user) +* [`config_name`](#config_name) +* [`client_id`](#client_id) +* [`client_secret`](#client_secret) +* [`service_account_credentials`](#service_account_credentials) +* [`scope`](#scope) +* [`root_folder_id`](#root_folder_id) +* [`team_drive`](#team_drive) + +##### `ensure` Data type: `Enum['present', 'absent']` configuration ensure -Default value: 'present' +Default value: `'present'` -##### `os_user` +##### `os_user` Data type: `String` operating system user - used to execute rclone commands, effective configuration owner -##### `config_name` +##### `config_name` Data type: `String` configuration name - should be unique among Rclone configurations, defaults to title -Default value: $title +Default value: `$title` -##### `client_id` +##### `client_id` Data type: `String` Google drive client_id, maps to Rclone `client_id` property -##### `client_secret` +##### `client_secret` Data type: `String` Google drive client_secret, maps to Rclone `client_secret` property -##### `service_account_credentials` +##### `service_account_credentials` Data type: `String` Google drive service_account_credentials, maps to Rclone `service_account_credentials` property -##### `scope` +##### `scope` Data type: `String` Google drive access scope, maps to Rclone `scope` property -Default value: 'drive' +Default value: `'drive'` -##### `root_folder_id` +##### `root_folder_id` Data type: `Optional[String]` Id of the drive root folder, maps to Rclone `root_folder_id` property -Default value: `undef` +Default value: ``undef`` -##### `team_drive` +##### `team_drive` Data type: `Optional[String]` Id of the team drive, maps to Rclone `team_drive` property -Default value: `undef` +Default value: ``undef`` -### rclone::config::s3 +### `rclone::config::s3` Ensures S3 Rclone configuration of given name and params. Include of `rclone` is required. Currently only AWS provider is supported. @@ -252,101 +271,115 @@ rclone::config::s3 { 's3_remote': #### Parameters -The following parameters are available in the `rclone::config::s3` defined type. +The following parameters are available in the `rclone::config::s3` defined type: + +* [`ensure`](#ensure) +* [`os_user`](#os_user) +* [`config_name`](#config_name) +* [`access_key_id`](#access_key_id) +* [`secret_access_key`](#secret_access_key) +* [`region`](#region) +* [`s3_provider`](#s3_provider) +* [`canned_acl`](#canned_acl) +* [`endpoint`](#endpoint) +* [`location_constraint`](#location_constraint) +* [`location_constraint`](#location_constraint) +* [`server_side_encryption`](#server_side_encryption) +* [`storage_class`](#storage_class) -##### `ensure` +##### `ensure` Data type: `Enum['present', 'absent']` configuration ensure -Default value: 'present' +Default value: `'present'` -##### `os_user` +##### `os_user` Data type: `String` operating system user - used to execute rclone commands, effective configuration owner -##### `config_name` +##### `config_name` Data type: `String` configuration name - should be unique among Rclone configurations, defaults to title -Default value: $title +Default value: `$title` -##### `access_key_id` +##### `access_key_id` Data type: `String` S3 provider's access_key_id, maps to Rclone `access_key_id` property -##### `secret_access_key` +##### `secret_access_key` Data type: `String` S3 provider's secret_access_key, maps to Rclone `secret_access_key` property -##### `region` +##### `region` Data type: `String` S3 provider's region, maps to Rclone `region` property -##### `s3_provider` +##### `s3_provider` Data type: `Enum['AWS']` S3 provider, maps to Rclone `provider` property -Default value: 'AWS' +Default value: `'AWS'` -##### `canned_acl` +##### `canned_acl` Data type: `Optional[String]` S3 canned ACL, maps to Rclone `acl` property -Default value: `undef` +Default value: ``undef`` -##### `endpoint` +##### `endpoint` Data type: `Optional[String]` S3 provider's endpoint, maps to Rclone `endpoint` property -Default value: `undef` +Default value: ``undef`` -##### `location_constraint` +##### `location_constraint` Data type: `Optional[String]` S3 location_constraint, maps to Rclone `location_constraint` property -Default value: `undef` +Default value: ``undef`` -##### `location_constraint` +##### `location_constraint` S3 location_constraint, maps to Rclone `location_constraint` property -Default value: `undef` +Default value: ``undef`` -##### `server_side_encryption` +##### `server_side_encryption` Data type: `Optional[String]` S3 server_side_encryption, maps to Rclone `server_side_encryption` property -Default value: `undef` +Default value: ``undef`` -##### `storage_class` +##### `storage_class` Data type: `Optional[String]` S3 storage_class, maps to Rclone `storage_class` property -Default value: `undef` +Default value: ``undef`` ## Functions