public static void Execute() { Console.WriteLine("-----"); Console.WriteLine(" \n\r// InsertKey"); Dictionary <string, string> request = new Dictionary <string, string>(); request.Add(RequestKeys.Token, Configuration.Token); request.Add(RequestKeys.Container, Configuration.Container); request.Add(RequestKeys.Operation, QueryOperation.InsertKey); request.Add(RequestKeys.Key, Configuration.Key_1); request.Add(RequestKeys.Data, Configuration.Data_1); List <string> tags = new List <string>(); tags.Add(PlyManConst.Update); tags.Add(PlyManConst.V2Operation); var tagsString = JsonConvert.SerializeObject(tags); request.Add(RequestKeys.Tags, tagsString); var requestString = JsonConvert.SerializeObject(request); var result = PlyQorManager.Query(requestString); Console.WriteLine(result); }
public static async Task <IActionResult> Run( [HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)] HttpRequest req, ILogger log) { Initializer.Execute(); log.LogInformation("C# HTTP trigger function processed a request."); string requestBody = await new StreamReader(req.Body).ReadToEndAsync(); var result = PlyQorManager.Query(requestBody); return(new OkObjectResult(result)); }
public static void Execute() { Console.WriteLine(" \n\r// SelectTags"); Dictionary <string, string> request = new Dictionary <string, string>(); request.Add(RequestKeys.Token, Configuration.Token); request.Add(RequestKeys.Container, Configuration.Container); request.Add(RequestKeys.Operation, QueryOperation.SelectTags); var requestString = JsonConvert.SerializeObject(request); var result = PlyQorManager.Query(requestString); Console.WriteLine(result); }
public static void Execute() { Console.WriteLine(" \n\r// DeleteKey"); Dictionary <string, string> requestDictionary = new Dictionary <string, string> { { RequestKeys.Token, Configuration.Token }, { RequestKeys.Container, Configuration.Container }, { RequestKeys.Operation, QueryOperation.DeleteKey }, { RequestKeys.Key, Configuration.Key_2 } }; var requestString = JsonConvert.SerializeObject(requestDictionary); var result = PlyQorManager.Query(requestString); Console.WriteLine(result); }
public static void Execute() { Console.WriteLine(" \n\r// DeleteTagByKey"); Dictionary <string, string> request = new Dictionary <string, string>(); request.Add(RequestKeys.Token, Configuration.Token); request.Add(RequestKeys.Container, Configuration.Container); request.Add(RequestKeys.Operation, QueryOperation.DeleteKeyTag); request.Add(RequestKeys.Key, Configuration.Key_2); request.Add(RequestKeys.Tag, PlyManConst.TestTagV2); var requestString = JsonConvert.SerializeObject(request); var result = PlyQorManager.Query(requestString); Console.WriteLine(result); }
public static List <string> Execute() { List <string> keys = new List <string>(); List <string> tags = new List <string>(); var inputTag = "DeletaTagsByKeyTest1,DeleteTagsByKeyTest2,DeleteTagsByKeyTest3"; var count = 3; var inputTags = inputTag.Split(","); foreach (var item in inputTags) { tags.Add(item); } for (int i = 0; i < count; i++) { Console.WriteLine(" \n\r -- InsertKey (CreateTestKeysWithTag)"); Dictionary <string, string> request = new Dictionary <string, string>(); var key_1 = Guid.NewGuid().ToString(); var data_1 = Guid.NewGuid().ToString(); keys.Add(key_1); request.Add(RequestKeys.Token, Configuration.Token); request.Add(RequestKeys.Container, Configuration.Container); request.Add(RequestKeys.Operation, QueryOperation.InsertKey); request.Add(RequestKeys.Key, key_1); request.Add(RequestKeys.Data, data_1); var tagsString = JsonConvert.SerializeObject(tags); request.Add(RequestKeys.Tags, tagsString); var requestString = JsonConvert.SerializeObject(request); var result = PlyQorManager.Query(requestString); Console.WriteLine(result); } return(keys); }