전체 글
-
Golang 기초 [1]Go 2021. 4. 12. 23:35
다음과 같은 환경에서 작업한다. > example |--> main.go 1. Go환경에서 프로그램 작동하기 Go는 기본적으로 package가 main인 파일에 main함수를 실행한다. 따라서 main.go에 package를 main으로 설정하고, main함수를 만들면 main의 첫줄부터 코드가 실행된다. main.go package main import "fmt" func main() { fmt.Println("Hello") } Hello package : 현재 파일의 패키지를 뜻한다. (main은 디렉토리 구조와 관계없이 main 패키지를 뜻한다.) import : 사용할 패키지(API 또는 다른 디렉토리에 내용을 사용하기위해 명시한다.)를 가져온다. fmt.Println : fmt패키지안에 Prin..
-
Golang - ORM(2) [8]Go 2021. 2. 8. 23:04
2021/02/07 - [Go] - RaspberryPi로 Golang 서버만들기 - ORM(1) [7] RaspberryPi로 Golang 서버만들기 - ORM(1) [7] 백엔드개발을 하다보면 데이터를 객체화해서 DB에 저장하는 일이 많다. 이 과정에서 DB에서 객체로 객체에서 DB로 변환해주는 과정을 거쳐야 된다. 이런 과정을 줄이고 정리하기위해 ORM이란걸 사 yun-seyeong.tistory.com 이전 글에서 보았던 ORM을 이용하면 더 간단히 API를 구성할 수 있다. 2021/01/06 - [Go] - RaspberryPi로 Golang 서버만들기 - 회원관리 하기(1) [6] RaspberryPi로 Golang 서버만들기 - 회원관리 하기(1) [6] 지금까지 세팅한 라즈베리로 회원관리..
-
Golang - ORM(1) [7]Go 2021. 2. 7. 23:36
백엔드개발을 하다보면 데이터를 객체화해서 DB에 저장하는 일이 많다. 이 과정에서 DB에서 객체로 객체에서 DB로 변환해주는 과정을 거쳐야 된다. 이런 과정을 줄이고 정리하기위해 ORM이란걸 사용하게된다. ORM 이란? 객체 관계 매핑(Object-relational mapping; ORM)은 데이터베이스와 객체 지향 프로그래밍 언어 간의 호환되지 않는 데이터를 변환하는 프로그래밍 기법이다. 객체 지향 언어에서 사용할 수 있는 "가상" 객체 데이터베이스를 구축하는 방법이다. 객체 관계 매핑을 가능하게 하는 상용 또는 무료 소프트웨어 패키지들이 있고, 경우에 따라서는 독자적으로 개발하기도한다. golang에서도 orm을 사용할 수 있도록 해주는 api가 있다. (https://gorm.io/index.ht..
-
EC2 - Docker MariaDB 설치하기 [5]AWS 2021. 1. 31. 19:51
2021/01/26 - [AWS] - EC2 - Ubuntu Docker 설치하기 [4] EC2 - Ubuntu Docker 설치하기 [4] 1. apt 업데이트, 패키지 설치 sudo apt-get update sudo apt-get install \ apt-transport-https \ ca-certificates \ curl \ gnupg-agent \ software-properties-common 2. GPG key 등록 curl -fsSL https://dow.. yun-seyeong.tistory.com 1. MariaDB 이미지 설치 docker pull mariadb 2. 컨테이너 생성 docker run -d -p 3306:3306 -e MYSQL_ROOT_PASSWORD=1234 m..
-
Flutter - Hero Animation[11]Flutter 2021. 1. 31. 19:04
1. 기본 앱 설정 void main() { runApp(MyApp()); } class MyApp extends StatelessWidget { // This widget is the root of your application. @override Widget build(BuildContext context) { return MaterialApp( title: 'Flutter Demo', home: MyHomePage(title: 'Flutter Demo Home Page'), ); } } 2. Main Page class MyHomePage extends StatefulWidget { MyHomePage({Key key, this.title}) : super(key: key); final String..
-
Flutter - Animation CurvedAnimation[10]Flutter 2021. 1. 28. 22:26
1. CurvedAnimation 기본 앱설정 class MyApp extends StatelessWidget { // This widget is the root of your application. @override Widget build(BuildContext context) { return MaterialApp( title: 'Flutter Demo', home: MyHomePage(title: 'Flutter Demo Home Page'), ); } } StatefulWidget 생성 class MyHomePage extends StatefulWidget { MyHomePage({Key key, this.title}) : super(key: key); final String title; @over..
-
Flutter - Animation Tween [9]Flutter 2021. 1. 28. 21:57
1. Tween 기본 앱설정 class MyApp extends StatelessWidget { // This widget is the root of your application. @override Widget build(BuildContext context) { return MaterialApp( title: 'Flutter Demo', home: MyHomePage(title: 'Flutter Demo Home Page'), ); } } StatefulWidget 생성 class MyHomePage extends StatefulWidget { MyHomePage({Key key, this.title}) : super(key: key); final String title; @override _MyHo..
-
EC2 - Ubuntu Docker 설치하기 [4]AWS 2021. 1. 26. 23:53
1. apt 업데이트, 패키지 설치 sudo apt-get update sudo apt-get install \ apt-transport-https \ ca-certificates \ curl \ gnupg-agent \ software-properties-common 2. GPG key 등록 curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - 3. repository에 추가 sudo add-apt-repository \ "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) \ stable" 4. docker 설치하기 apt-get..