Documentation ¶
Index ¶
- Constants
- func EncodeToFileString(filePath string) (string, error)
- func EncryptRSA(text, publicKey string) (string, error)
- func TrimAll(str string) string
- type Codef
- func (self *Codef) AddAccount(serviceType ServiceType, param map[string]interface{}) (string, error)
- func (self *Codef) CreateAccount(serviceType ServiceType, param map[string]interface{}) (string, error)
- func (self *Codef) DeleteAccount(serviceType ServiceType, param map[string]interface{}) (string, error)
- func (self *Codef) GetAccountList(serviceType ServiceType, param map[string]interface{}) (string, error)
- func (self *Codef) GetConnectedIDList(serviceType ServiceType, param map[string]interface{}) (string, error)
- func (self *Codef) RequestCertification(productPath string, serviceType ServiceType, param map[string]interface{}) (string, error)
- func (self *Codef) RequestProduct(productPath string, serviceType ServiceType, param map[string]interface{}) (string, error)
- func (self *Codef) RequestToken(serviceType ServiceType) (map[string]interface{}, error)
- func (self *Codef) SetAccessToken(accessToken string, serviceType ServiceType)
- func (self *Codef) SetClientInfo(clientID, clientSecret string)
- func (self *Codef) SetClientInfoForDemo(clientId, clientSecret string)
- func (self *Codef) UpdateAccount(serviceType ServiceType, param map[string]interface{}) (string, error)
- type Response
- type ServiceType
Constants ¶
View Source
const ( OAuthDomain = "https://oauth.codef.io" // OAUTH 서버 도메인 PathGetToken = "/oauth/token" // OAUTH 엑세스 토큰 발급 URL PATH SandboxDomain = "https://sandbox.codef.io" // 샌드박스 서버 도메인 SandboxClientID = "ef27cfaa-10c1-4470-adac-60ba476273f9" // 샌드박스 엑세스 토큰 발급을 위한 클라이언트 아이디 SandboxClientSecret = "83160c33-9045-4915-86d8-809473cdf5c3" // 샌드박스 액세스 토큰 발급을 위한 클라이언트 시크릿 DemoDomain = "https://development.codef.io" // 데모 서버 도메인 APIDomain = "https://api.codef.io" // 정식 서버 도메인 PathCreateAccount = "/v1/account/create" // 계정 등록 URL PathAddAccount = "/v1/account/add" // 계정 추가 URL PathUpdateAccount = "/v1/account/update" // 계정 수정 URL PathDeleteAccount = "/v1/account/delete" // 계정 삭제 URL PathGetAccountList = "/v1/account/list" // 계정 목록 조회 URL PathGetCIDList = "/v1/account/connectedId-list" // 커넥티드 아이디 목록 조회 URL KeyResult = "result" // 응답부 수행 결과 키워드 KeyCode = "code" // 응답부 수행 결과 메시지 코드 키워드 KeyMessage = "message" // 응답부 수행 결과 메시지 키워드 KeyExtraMessage = "extraMessage" // 응답부 수행 결과 추가 메시지 키워드 KeyData = "data" KeyAccountList = "accountList" // 계정 목록 키워드 KeyConnectedID = "connectedId" KeyInvalidToken = "invalidToken" // 엑세스 토큰 거절 사유1 KeyAccessDenied = "accessDenied" // 엑세스 토큰 거절 사유2 )
Variables ¶
This section is empty.
Functions ¶
func EncodeToFileString ¶
파일 정보를 base64 문자열로 인코딩
Types ¶
type Codef ¶
type Codef struct { PublicKey string // 유저 퍼블릭키 // contains filtered or unexported fields }
CODEF API
func (*Codef) AddAccount ¶
func (self *Codef) AddAccount(serviceType ServiceType, param map[string]interface{}) (string, error)
게정 정보 추가
func (*Codef) CreateAccount ¶
func (self *Codef) CreateAccount(serviceType ServiceType, param map[string]interface{}) (string, error)
connectedID 발급을 위한 계정 등록
func (*Codef) DeleteAccount ¶
func (self *Codef) DeleteAccount(serviceType ServiceType, param map[string]interface{}) (string, error)
계정 정보 삭제
func (*Codef) GetAccountList ¶
func (self *Codef) GetAccountList(serviceType ServiceType, param map[string]interface{}) (string, error)
connectedID로 등록된 계정 목록 조회
func (*Codef) GetConnectedIDList ¶
func (self *Codef) GetConnectedIDList(serviceType ServiceType, param map[string]interface{}) (string, error)
클라이언트 정보로 등록된 모든 connectedID 목록 조회
func (*Codef) RequestCertification ¶
func (self *Codef) RequestCertification( productPath string, serviceType ServiceType, param map[string]interface{}, ) (string, error)
상품 추가인증 요청
func (*Codef) RequestProduct ¶
func (self *Codef) RequestProduct( productPath string, serviceType ServiceType, param map[string]interface{}, ) (string, error)
상품 요청
func (*Codef) RequestToken ¶
func (self *Codef) RequestToken(serviceType ServiceType) (map[string]interface{}, error)
토큰 발급
func (*Codef) SetAccessToken ¶
func (self *Codef) SetAccessToken(accessToken string, serviceType ServiceType)
액세스 토큰 정보 셋팅
func (*Codef) SetClientInfo ¶
정식서버 사용을 위한 클라이언트 정보 설정
func (*Codef) SetClientInfoForDemo ¶
데모 서버 사용을 위한 클라이언트 정보 설정
func (*Codef) UpdateAccount ¶
func (self *Codef) UpdateAccount(serviceType ServiceType, param map[string]interface{}) (string, error)
계정 정보 수정
type ServiceType ¶
type ServiceType int // 코드에프 이용 서비스 타입 정보
const ( TypeProduct ServiceType = iota // 정식버전 TypeDemo // 데모 버전 TypeSandbox // 샌드박스 )
Click to show internal directories.
Click to hide internal directories.