member-lib

module
v0.20.1 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2024 License: MIT

README

Member-Lib

Go Reference CI Security

Overview

member-lib is a Go library by Coop Norge designed to provide reusable packages for various use cases within the Member domain.

It aims to enhance productivity and provide generalized, abstract solutions applicable across a variety of use cases.

Installing

To install the library, use:

go get github.com/coopnorge/member-lib/{package_of_interest}
Usage

Import the desired package in your Go project:

import "github.com/coopnorge/member-lib/pkg/<package_name>"
Example
package main

import (
  "fmt"
  "github.com/coopnorge/member-lib/pkg/package1"
)

func main() {
  result := package1.Function()
  fmt.Println(result)
}

Contribution

We welcome contributions!

For code style we have own preferences but not so different for standard Go style. However, good to keep in mind:

  • Abstract and not contain domain related names.
  • Components must be covered with tests.
  • Code style go standards with some Coop preferences. if you are internally contributor, please visit: Coop Golan Guidelines
Please follow these steps:
  1. Fork the repository.
  2. Create a new branch.
  3. Make your changes and commit them.
  4. Push your changes and create a pull request.

Testing

To verify if technical documentation is built properly run:

docker compose up techdocs
Golang

Components must be:

For validating and building Golang code you can use Coops docker tool.

Build images:

docker compose build

See available targets:

docker compose run --rm golang-devtools help

Validate golang:

docker compose run --rm golang-devtools validate VERBOSE=all

Test golang code:

docker compose run --rm golang-devtools test VERBOSE=all

Directories

Path Synopsis
pkg
Package pkg provides designed with core principles
Package pkg provides designed with core principles
behavior/breaker
Package breaker implements the Circuit Breaker pattern.
Package breaker implements the Circuit Breaker pattern.
contextext
Package contextext allows to extend existing context with generic support to allow work easier to get values from it.
Package contextext allows to extend existing context with generic support to allow work easier to get values from it.
coordinator
Package coordinator help manage the primary function of your application or service in a cleaner way.
Package coordinator help manage the primary function of your application or service in a cleaner way.
coordinator/process
Package process is a subpackage of coordinator, providing simple way to create and manage processes such as servers, metrics, and profiling in a clean and controlled manner.
Package process is a subpackage of coordinator, providing simple way to create and manage processes such as servers, metrics, and profiling in a clean and controlled manner.
creational/pool
Package pool or Object Pool design pattern is a way to manage the allocation and reuse of objects, especially when creating new instances of these objects is costly in terms of resources or performance.
Package pool or Object Pool design pattern is a way to manage the allocation and reuse of objects, especially when creating new instances of these objects is costly in terms of resources or performance.
date
Package date offers features for handling stringified date components, including day, month, and year.
Package date offers features for handling stringified date components, including day, month, and year.
net/grpcdetails
Package grpcdetails provides utilities for extracting detailed client information in gRPC contexts.
Package grpcdetails provides utilities for extracting detailed client information in gRPC contexts.
net/openapi
Package openapi provides utilities that help work with responses and generated code of https://swagger.io/specification for APIs.
Package openapi provides utilities that help work with responses and generated code of https://swagger.io/specification for APIs.
security/oauth
Package oauth provides simple abstract client that allows work with OAuth 2 to obtain Access token.
Package oauth provides simple abstract client that allows work with OAuth 2 to obtain Access token.
stringconv
Package stringconv provides functions for string conversions to various number types.
Package stringconv provides functions for string conversions to various number types.
tracelogix
Package tracelogix provides a service for collecting and managing contextual information to correlate related logs throughout the lifecycle of a request or operation.
Package tracelogix provides a service for collecting and managing contextual information to correlate related logs throughout the lifecycle of a request or operation.
validator/phone
Package phone provides functions for working with string number related information.
Package phone provides functions for working with string number related information.

Jump to

Keyboard shortcuts

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