using System.Collections.Generic; using System.Threading.Tasks; namespace Octokit { /// /// A client for GitHub's Repository Secrets API. /// /// /// See the Repository Secrets API documentation for more details. /// public interface IRepositorySecretsClient { /// /// Get the public signing key to encrypt secrets for a repository. /// /// /// See the API documentation for more information. /// /// The owner of the repository /// The name of the repository /// Thrown when a general API error occurs. /// A instance for the repository public key. Task GetPublicKey(string owner, string repoName); /// /// List the secrets for a repository. /// /// /// See the API documentation for more information. /// /// The owner of the repository /// The name of the repository /// Thrown when a general API error occurs. /// A instance for the list of repository secrets. Task GetAll (string owner, string repoName); /// /// Get a secret from a repository. /// /// /// See the API documentation for more information. /// /// The owner of the repository /// The name of the repository /// The name of the secret /// Thrown when a general API error occurs. /// A instance for the repository secret. Task Get(string owner, string repoName, string secretName); /// /// Create or update a secret in a repository. /// /// /// See the API documentation for more information. /// /// The owner of the repository /// The name of the repository /// The name of the secret /// The encrypted value and id of the encryption key /// Thrown when a general API error occurs. /// A instance for the repository secret that was created or updated. Task CreateOrUpdate(string owner, string repoName, string secretName, UpsertRepositorySecret upsertSecret); /// /// Delete a secret in a repository. /// /// /// See the API documentation for more information. /// /// The owner of the repository /// The name of the repository /// The name of the secret /// Thrown when a general API error occurs. Task Delete(string owner, string repoName, string secretName); } }