Skip to content

Instantly share code, notes, and snippets.

@ahmetkucukoglu
ahmetkucukoglu / CommentsController.cs
Last active November 12, 2019 19:44
AWS Serverless Kuyruklama Sistemi Geliştirme - CommentsController.cs v2
namespace AwsDotnetCsharp.Controllers
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Amazon.DynamoDBv2;
using Amazon.DynamoDBv2.Model;
using Amazon.SQS;
using Amazon.SQS.Model;
@ahmetkucukoglu
ahmetkucukoglu / serverless.yml
Last active November 13, 2019 19:05
AWS Serverless Kuyruklama Sistemi Geliştirme - serverless.yml v2
service: comments-api
provider:
name: aws
runtime: dotnetcore2.1
region: eu-central-1
profile: serverlessuser
apiKeys:
- CommentsAPIKey
environment:
@ahmetkucukoglu
ahmetkucukoglu / ConsumerHandler.cs
Last active November 13, 2019 20:17
AWS Serverless Kuyruklama Sistemi Geliştirme - ConsumerHandler.cs
[assembly: Amazon.Lambda.Core.LambdaSerializer(typeof(Amazon.Lambda.Serialization.Json.JsonSerializer))]
namespace AwsDotnetCsharp
{
using Amazon.Lambda.Core;
using Amazon.Lambda.SQSEvents;
using System;
using Amazon.Comprehend;
using Amazon.Comprehend.Model;
using System.Net;
using System.Linq;
@ahmetkucukoglu
ahmetkucukoglu / CommentsQueueRequest.cs
Last active November 13, 2019 20:16
AWS Serverless Kuyruklama Sistemi Geliştirme - CommentsQueueRequest.cs
namespace AwsDotnetCsharp.Models
{
public class CommentsQueueRequest
{
public string Id { get; set; }
public string Comment { get; set; }
}
}
@ahmetkucukoglu
ahmetkucukoglu / serverless.yml
Created November 13, 2019 19:18
AWS Serverless Kuyruklama Sistemi Geliştirme - serverless.yml
service: comments-consumer
provider:
name: aws
runtime: dotnetcore2.1
region: eu-central-1
profile: serverlessuser
environment:
DBTableName: !ImportValue CommentsDynamoDBTableName
iamRoleStatements:
@ahmetkucukoglu
ahmetkucukoglu / Program.cs
Last active November 19, 2019 20:08
GCP Docker Image'ı Serverless Olarak Yayına Alma - Program.cs
namespace CloudRunSampleAPI
{
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using System;
public class Program
{
public static void Main(string[] args)
{
@ahmetkucukoglu
ahmetkucukoglu / 6fa3ec35-4615-43a3-b7ad-a33019172cb1_meetup.json
Created January 5, 2020 13:59
Event Sourcing Neydi? - meetup.json
{
"MeetupId": "6fa3ec35-4615-43a3-b7ad-a33019172cb1",
"OrganizerId": "ac10b1aa-6f10-4c54-a1b6-f8fd9f84cbd7",
"Subject": "Event Sourcing Neydi?",
"Description": "ES+CQRS öğreniyoruz.",
"When": "05.01.2020 17.00",
"Address": "Bellevue Residences, Levent Mahallesi, Aydın Sokak No:7, Levent 34340 İstanbul, Türkiye",
"StoppedDate": "05.01.2020 16.08",
"CompletedDate": "05.01.2020 19.00",
"Participants": [
@ahmetkucukoglu
ahmetkucukoglu / appsettings.json
Created February 12, 2020 18:58
ASP.NET Core ile Couchbase GeoSearch - appsettings.json
{
"Couchbase": {
"Username": "admin",
"Password": "123456",
"ConnectionString": "couchbase://localhost"
},
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
@ahmetkucukoglu
ahmetkucukoglu / Startup.cs
Last active February 12, 2020 20:45
ASP.NET Core ile Couchbase GeoSearch - Startup.cs
namespace Couchbase.GeoSearchApp
{
using Couchbase.Extensions.DependencyInjection;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
public class Startup
@ahmetkucukoglu
ahmetkucukoglu / EventDocument.cs
Last active February 12, 2020 20:44
ASP.NET Core ile Couchbase GeoSearch - EventDocument.cs
namespace Couchbase.GeoSearchApp
{
using System;
public class EventDocument
{
public string Subject { get; set; }
public DateTimeOffset Date { get; set; }
public string Description { get; set; }
public string Address { get; set; }