Categorygithub.com/MxelA/tmf-service-go
modulepackage
0.0.0-20241226131723-5d88a466b734
Repository: https://github.com/mxela/tmf-service-go.git
Documentation: pkg.go.dev

# README

Go TMF Service application

  • Application is in developing stage

Application contains:

TMF 641 v4.2 - Service Ordering Management

  • Version 4.2.0 The Service Order API provides a standardized mechanism for managing Service Order, a type of order which can be used to place an order between internal Customer Order management system to service order management system or between a service provider and a partner and vice versa.

Service Order resource

  • A service order will describe a list of service order items. A service order item references an action on an existing or future service. By service we designed Customer Facing Service (CFS) as well as Resource Facing Service (RFS). From a component perspective, a service order should be available
  • from a Service Orchestration Component (and it could mix CFS and RFS)
  • from an Infrastructure Control & Management component (and it would have only RFS)

TMF641 performs the following operations on service order resource :

  • Retrieval of a service order or a collection of service orders depending on filter criteria
  • Partial update of a service order (including updating rules)
  • Creation of a service order (including default values and creation rules)
  • Deletion of service order (for administration purposes)
  • Notification of events on Service order The REST API for Service Order Management provides a standardized mechanism for placing a service order with all the necessary order parameters. It allows users to create, update & retrieve Service Orders and manages related notifications.

Setup notes

Install Task

$ brew install go-task/tap/go-task 
  $ task --list
  task: Available tasks for this project:
    * build:        Build the app
    * run:          Run the app
    * swagger.doc:      Doc for swagger
    * swagger.gen:      generate Go code
    * swagger.validate:     Validate swagger

Install Go Swagger

sudo apt update
sudo apt install -y apt-transport-https gnupg curl debian-keyring debian-archive-keyring
  • Register GPG signing key
curl -1sLf 'https://dl.cloudsmith.io/public/go-swagger/go-swagger/gpg.2F8CB673971B5C9E.key' | sudo gpg --dearmor -o /usr/share/keyrings/go-swagger-go-swagger-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/go-swagger/go-swagger/config.deb.txt?distro=debian&codename=any-version' | sudo tee /etc/apt/sources.list.d/go-swagger-go-swagger.list
  • Install
sudo apt update 
sudo apt install swagger

Validate Swagger specification

$ task swagger.validate.v4

Generate Swagger documentation

$ task swagger.doc.v4

Generate a self-signed TLS for local development

  • Install OpenSSL
sudo apt install openssl
  • Generate a Private Key

    • A private key is a cryptographic key used to encrypt and decrypt data. It's essential for establishing secure communication in TLS/SSL.
openssl genrsa -out tls.key 2048
  • Create a Certificate Signing Request (CSR)
    • A CSR is a file that contains your public key and organization details. It’s used when requesting a certificate from a Certificate Authority (CA). For a self-signed certificate, it’s still a necessary step as it includes key metadata and helps create the certificate.
openssl req -new -key tls.key -out tls.csr
  • Generate a Self-Signed Certificate
    • A self-signed certificate is a certificate you sign yourself (instead of relying on a CA). It’s suitable for local development or testing but not recommended for production.
openssl x509 -req -in tls.csr -signkey tls.key -out tls.crt -days 365

Run server

go run main.go --tls-certificate=tls.crt --tls-key=tls.key  --tls-port=34191

# Packages

No description provided by the author