opencontractinggo

package module
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2025 License: MIT Imports: 6 Imported by: 0

README

Project logo

Project Title

Status License


Few lines describing your project.

📝 Table of Contents

🧐 About

Write about 1-2 paragraphs describing the purpose of your project.

🏁 Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

What things you need to install the software and how to install them.

Give examples

Installing

A step by step series of examples that tell you how to get a development env running.

Say what the step will be

Give the example

And repeat

until finished

End with an example of getting some data out of the system or using it for a little demo.

🔧 Running the tests

Explain how to run the automated tests for this system.

Break down into end to end tests

Explain what these tests test and why

Give an example

And coding style tests

Explain what these tests test and why

Give an example

🎈 Usage

Add notes about how to use the system.

🚀 Deployment

Add additional notes about how to deploy this on a live system.

⛏️ Built Using

✍️ Authors

🎉 Acknowledgements

  • Hat tip to anyone whose code was used
  • Inspiration
  • References

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseOpenContractToJSON

func ParseOpenContractToJSON(openContract OpenContract) []byte

Types

type Address

type Address struct {
	Street      string `json:"streetAddress"`
	Locality    string `json:"locality"`
	Region      string `json:"region"`
	PostalCode  string `json:"postalCode"`
	Country     string `json:"countryName"`
	Description string `json:"description"`
}

type Buyer

type Buyer struct {
	Name         string       `json:"name"`
	ID           string       `json:"id"`
	Identifier   Identifier   `json:"identifier"`
	Address      Address      `json:"address"`
	ContactPoint ContactPoint `json:"contactPoint"`
}

type ContactPoint

type ContactPoint struct {
	Name      string `json:"name"`
	Email     string `json:"email"`
	Telephone string `json:"telephone"`
	FaxNumber string `json:"faxNumber"`
	Url       string `json:"url"`
}

type DeliverLocation

type DeliverLocation struct {
	Description string `json:"description" extension:"deliveryLocation"`
}

type Document

type Document struct {
	ID            string   `json:"id"`
	URL           string   `json:"url"`
	RelatedLots   []string `json:"relatedLots"`
	DocumentType  string   `json:"documentType"`
	Title         string   `json:"title"`
	Description   string   `json:"description"`
	DatePublished string   `json:"datePublished"`
	Format        string   `json:"format"`
	Language      string   `json:"language"`
}

type Identifier

type Identifier struct {
	Id        string `json:"id"`
	LegalName string `json:"legalName"`
	Scheme    string `json:"scheme"`
}

type MonetaryValue

type MonetaryValue struct {
	Amount   float64 `json:"amount"`
	Currency string  `json:"currency"`
}

type OpenContract

type OpenContract struct {
	Version           string    `json:"version"`
	URI               string    `json:"uri"`
	PublishedDate     time.Time `json:"publishedDate"`
	Extensions        []string  `json:"extensions"`
	Releases          []Release `json:"releases"`
	Publisher         Publisher `json:"publisher"`
	License           string    `json:"license"`
	PublicationPolicy string    `json:"publicationPolicy"`
}

func ParseJSONFileToBiddingOffer

func ParseJSONFileToBiddingOffer(filePath string) OpenContract

func ParseJSONToBiddingOffer

func ParseJSONToBiddingOffer(byteArray []byte, strict bool) OpenContract

type Party

type Party struct {
	Name         string       `json:"name"`
	ID           string       `json:"id"`
	Identifier   Identifier   `json:"identifier"`
	Address      Address      `json:"address"`
	ContactPoint ContactPoint `json:"contactPoint"`
	Roles        []string     `json:"roles"`
}

type Period

type Period struct {
	StartDate      string `json:"startDate"`
	EndDate        string `json:"endDate"`
	DurationInDays int    `json:"durationInDays"`
}

type Publisher

type Publisher struct {
	Name   string `json:"name"`
	Scheme string `json:"scheme"`
	Uid    string `json:"uid"`
	Uri    string `json:"uri"`
}

type Release

type Release struct {
	OCID              string    `json:"ocid"`
	ID                string    `json:"id"`
	Date              string    `json:"date"`
	Tag               []string  `json:"tag"`
	Parties           []Party   `json:"parties"`
	Buyer             Buyer     `json:"buyer"`
	Tender            Tender    `json:"tender"`
	Publisher         Publisher `json:"publisher"`
	License           string    `json:"license"`
	PublicationPolicy string    `json:"publicationPolicy"`
	Language          string    `json:"language"`
	InitiationType    string    `json:"initiationType"`
}

type Tender

type Tender struct {
	ID                         string                `json:"id"`
	Title                      string                `json:"title"`
	Description                string                `json:"description"`
	ProcuringEntity            TenderProcuringEntity `json:"procuringEntity"`
	Items                      []TenderItem          `json:"items"`
	Awards                     []TenderAward         `json:"awards"`
	Language                   string                `json:"language"`
	ProcurementMethodDetails   string                `json:"procurementMethodDetails"`
	MainProcurementCategory    string                `json:"mainProcurementCategory"`
	NumberOfTenderers          int                   `json:"numberOfTenderers"`
	Documents                  []Document            `json:"documents"`
	ReleaseOcid                string
	Status                     string        `json:"status"`
	MinValue                   MonetaryValue `json:"minValue"`
	Value                      MonetaryValue `json:"value"`
	ProcurementMethod          string        `json:"procurementMethod"`
	ProcurementMethodRationale string        `json:"procurementMethodRationale"`
	AwardCriteria              string        `json:"awardCriteria"`
	AwardCriteriaDetails       string        `json:"awardCriteriaDetails"`
	SubmissionMethod           []string      `json:"submissionMethod"`
	SubmissionMethodDetails    string        `json:"submissionMethodDetails"`
	TenderPeriod               Period        `json:"tenderPeriod"`
	EnquiryPeriod              Period        `json:"enquiryPeriod"`
	AwardPeriod                Period        `json:"awardPeriod"`
	ContractPeriod             Period        `json:"contractPeriod"`
	HasEnquiries               bool          `json:"hasEnquiries"`
	Lots                       []any         `json:"lots" extensions:lots` // Lots extension
}

func SynthesizeTenderID

func SynthesizeTenderID(release Release) Tender

func SynthesizeTenderName

func SynthesizeTenderName(release Release) Tender

type TenderAward

type TenderAward struct {
	ID          string   `json:"id"`
	Status      string   `json:"status"`
	RelatedLots []string `json:"relatedLots"`
}

type TenderItem

type TenderItem struct {
	ID                        string                   `json:"id"`
	Classification            TenderItemClassification `json:"classification"`
	AdditionalClassifications []TenderItemClassification
	Lots                      []TenderItemLot `json:"lots"`
	RelatedLot                string          `json:"relatedLot"`
	DeliveryAddress           Address         `json:"deliveryAddress"`
	Description               string          `json:"description"`
	Quantity                  float32         `json:"quantity"`
	Unit                      TenderUnit      `json:"unit"`
	DeliveryLocation          DeliverLocation `json:"deliveryLocation"`
}

type TenderItemClassification

type TenderItemClassification struct {
	Scheme      string `json:"scheme"`
	ID          string `json:"id"`
	Description string `json:"description"`
	URI         string `json:"uri"`
}

type TenderItemLot

type TenderItemLot struct {
	ID          string `json:"id"`
	Title       string `json:"title"`
	Description string `json:"description"`
}

type TenderProcuringEntity

type TenderProcuringEntity struct {
	Name string `json:"name"`
	ID   string `json:"id"`
}

type TenderUnit

type TenderUnit struct {
	Name   string        `json:"name"`
	Id     string        `json:"id"`
	Scheme string        `json:"scheme"`
	Value  MonetaryValue `json:"value"`
}

Jump to

Keyboard shortcuts

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