core

package module
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 19, 2024 License: AGPL-3.0 Imports: 4 Imported by: 5

README

Application core library

Configure access to private modules on gitlab

This notion page explains how to configure local environment to work with private modules stored in Picnic gitlab repository.

Import core library to the service

$ go get gitlab.com/picnic-app/backend/libs/golang/core
import "gitlab.com/picnic-app/backend/libs/golang/core"

Example application

See example/main.go for working bootstrap example.

Configuration

Minimal configuration file in folder .cfg/k8s

service:
  ports:
    http: 8080
    grpc: 8082
    debug: 8084

env:
  log_level: DEBUG

Create .yaml configuration files for all project environments: dev.yaml, stg.yaml and prod.yaml. Put these files to .cfg/k8s folder.

Local testing configuration

For local testing copy dev.yaml configuration file to local.yaml and change required values correspondingly.

Create .gitignore file in the same folder and add local.yaml there to avoid pushing local config to origin repository.

Run locally

$ go run example/main.go

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfig

func GetConfig(ctx context.Context) (config.Config, error)

GetConfig ..

Types

type Application

type Application interface {
	app.Application
}

Application main application interface

func InitApp

func InitApp(ctx context.Context) (Application, error)

InitApp load configuration and initialise the app

func InitAppWithOptions

func InitAppWithOptions(ctx context.Context, logOptions mw.LogOptions) (Application, error)

InitAppWithOptions load configuration and initialise the app with interceptor configuration

type IService

type IService interface {
	app.IService
}

IService app service interface

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL