private async Task LoadSecrets() { System.Console.WriteLine(nameof(LoadSecrets)); System.Console.WriteLine($"BuildConfig using {CurrentContext}"); var clientConfig = _config.CreateClientConfiguration(CurrentContext); System.Console.WriteLine("Create client..."); var client = new Kubernetes(clientConfig); System.Console.WriteLine("Starting request..."); var secrets = await client.ListSecretForAllNamespacesWithHttpMessagesAsync(); System.Console.WriteLine("Request complete."); if (secrets.Response.IsSuccessStatusCode) { foreach (var secret in secrets.Body.Items) { var svm = new SecretViewModel { Namespace = secret.Metadata.NamespaceProperty, Name = secret.Metadata.Name, }; Secrets.Add(svm); } } }
public virtual void AddSecret( [NotNull] string value, DateTime?expiration = null, string type = IdentityServerConstants.SecretTypes.SharedSecret, string description = null) { Secrets.Add(new ApiSecret(Id, value, expiration, type, description)); }
public void AddSecrets(ApiResourceSecret apiResourceSecret) { if (Secrets == null) { Secrets = new List <ApiResourceSecret>(); } Secrets.Add(apiResourceSecret); }
public virtual void AddSecret( [NotNull] string value, DateTime?expiration, string type, string description) { Secrets.Add(new ApiSecretDto(Id, value, expiration, type, description)); }
public bool NewSecret(Entity entity) { if(entity == null || !entity.IsSecret || !entity.HasTag(GameTag.CLASS)) return false; if(entity.HasCardId) Exclude(entity.CardId, false); var secret = new Secret(entity); Secrets.Add(secret); OnNewSecret(secret); Refresh(); Log.Info(entity.ToString()); return true; }
public void NewSecretPlayed(HeroClass heroClass, int id, int turn, string knownCardId = null) { var helper = new SecretHelper(heroClass, id, turn); if (knownCardId != null) { foreach (var cardId in SecretHelper.GetSecretIds(heroClass)) { helper.PossibleSecrets[cardId] = cardId == knownCardId; } } Secrets.Add(helper); Logger.WriteLine("Added secret with id:" + id, "OpponentSecrets"); }
public void NewSecretPlayed(HeroClass heroClass, int id, int turn, string knownCardId = null) { var helper = new SecretHelper(heroClass, id, turn); if (knownCardId != null) { foreach (var cardId in SecretHelper.GetSecretIds(heroClass)) { helper.TrySetSecret(cardId, cardId == knownCardId); } } Secrets.Add(helper); Log.Info("Added secret with id:" + id); }
public bool NewSecret(Entity entity) { if (entity == null || !entity.IsSecret || !entity.HasTag(GameTag.CLASS)) { return(false); } if (entity.HasCardId) { Exclude(entity.CardId, false); } Secrets.Add(new Secret(entity)); OnSecretsChanged?.Invoke(GetSecretList()); Log.Info(entity.ToString()); return(true); }
public void AddSecret(UserOrNpcInfo target) { if (!target.IsNpc && Secrets.Any(u => u.UserId == ((UserInfo)target).User.Id)) { return; } else if (Secrets.Any(u => u.Name == target.NickOrName)) { return; } if (target.IsNpc) { Secrets.Add(new Secret(target.NickOrName)); } else { Secrets.Add(new Secret(((UserInfo)target).User)); } }
public void AddSharedSecret(string secret, DateTime?expirationDateTime) { Secrets.Add(new ClientSecret(ClientSecretTypes.SharedSecret, secret, expirationDateTime)); }
public void AddPrizeSecret(string name) { Secrets.Add(new Secret(name)); }
public void NewSecretPlayed(int id, bool stolen) { Secrets.Add(new SecretHelper(HeroClass, id, stolen)); Logger.WriteLine("Added secret with id:" + id, "OpponentSecrets"); }
public void AddSharedSecret(string secret) { Secrets.Add(new ClientSecret(ClientSecretTypes.SharedSecret, PasswordHelper.ComputeHash(secret))); }