github.com/kyma-incubator/compass/components/director@v0.0.0-20230623144113-d764f56ff805/internal/model/runtime_context.go (about)

     1  package model
     2  
     3  import (
     4  	"github.com/kyma-incubator/compass/components/director/pkg/pagination"
     5  )
     6  
     7  // RuntimeContext missing godoc
     8  type RuntimeContext struct {
     9  	ID        string
    10  	RuntimeID string
    11  	Key       string
    12  	Value     string
    13  }
    14  
    15  // GetID missing godoc
    16  func (r *RuntimeContext) GetID() string {
    17  	return r.ID
    18  }
    19  
    20  // RuntimeContextInput missing godoc
    21  type RuntimeContextInput struct {
    22  	Key       string
    23  	Value     string
    24  	RuntimeID string
    25  }
    26  
    27  // ToRuntimeContext missing godoc
    28  func (i *RuntimeContextInput) ToRuntimeContext(id string) *RuntimeContext {
    29  	if i == nil {
    30  		return nil
    31  	}
    32  
    33  	return &RuntimeContext{
    34  		ID:        id,
    35  		RuntimeID: i.RuntimeID,
    36  		Key:       i.Key,
    37  		Value:     i.Value,
    38  	}
    39  }
    40  
    41  // RuntimeContextPage missing godoc
    42  type RuntimeContextPage struct {
    43  	Data       []*RuntimeContext
    44  	PageInfo   *pagination.Page
    45  	TotalCount int
    46  }