Documentation ¶
Index ¶
- Constants
- func CopyFile(src string, dst string) error
- type CreateForecastCreateForecast
- func (v *CreateForecastCreateForecast) GetCloses() *time.Time
- func (v *CreateForecastCreateForecast) GetCreated() time.Time
- func (v *CreateForecastCreateForecast) GetDescription() string
- func (v *CreateForecastCreateForecast) GetEstimates() []*CreateForecastCreateForecastEstimatesEstimate
- func (v *CreateForecastCreateForecast) GetId() string
- func (v *CreateForecastCreateForecast) GetResolves() time.Time
- func (v *CreateForecastCreateForecast) GetTitle() string
- type CreateForecastCreateForecastEstimatesEstimate
- func (v *CreateForecastCreateForecastEstimatesEstimate) GetCreated() time.Time
- func (v *CreateForecastCreateForecastEstimatesEstimate) GetId() string
- func (v *CreateForecastCreateForecastEstimatesEstimate) GetProbabilities() []*CreateForecastCreateForecastEstimatesEstimateProbabilitiesProbability
- func (v *CreateForecastCreateForecastEstimatesEstimate) GetReason() string
- type CreateForecastCreateForecastEstimatesEstimateProbabilitiesProbability
- func (v *CreateForecastCreateForecastEstimatesEstimateProbabilitiesProbability) GetId() string
- func (v *CreateForecastCreateForecastEstimatesEstimateProbabilitiesProbability) GetOutcome() CreateForecastCreateForecastEstimatesEstimateProbabilitiesProbabilityOutcome
- func (v *CreateForecastCreateForecastEstimatesEstimateProbabilitiesProbability) GetValue() int
- type CreateForecastCreateForecastEstimatesEstimateProbabilitiesProbabilityOutcome
- func (v *CreateForecastCreateForecastEstimatesEstimateProbabilitiesProbabilityOutcome) GetCorrect() bool
- func (v *CreateForecastCreateForecastEstimatesEstimateProbabilitiesProbabilityOutcome) GetId() string
- func (v *CreateForecastCreateForecastEstimatesEstimateProbabilitiesProbabilityOutcome) GetText() string
- type CreateForecastResponse
- type GetForecastsForecastsForecast
- func (v *GetForecastsForecastsForecast) GetCloses() *time.Time
- func (v *GetForecastsForecastsForecast) GetCreated() time.Time
- func (v *GetForecastsForecastsForecast) GetEstimates() []*GetForecastsForecastsForecastEstimatesEstimate
- func (v *GetForecastsForecastsForecast) GetId() string
- func (v *GetForecastsForecastsForecast) GetResolution() Resolution
- func (v *GetForecastsForecastsForecast) GetResolves() time.Time
- func (v *GetForecastsForecastsForecast) GetTitle() string
- type GetForecastsForecastsForecastEstimatesEstimate
- func (v *GetForecastsForecastsForecastEstimatesEstimate) GetBrierScore() *float64
- func (v *GetForecastsForecastsForecastEstimatesEstimate) GetCreated() time.Time
- func (v *GetForecastsForecastsForecastEstimatesEstimate) GetId() string
- func (v *GetForecastsForecastsForecastEstimatesEstimate) GetProbabilities() []*GetForecastsForecastsForecastEstimatesEstimateProbabilitiesProbability
- type GetForecastsForecastsForecastEstimatesEstimateProbabilitiesProbability
- type GetForecastsForecastsForecastEstimatesEstimateProbabilitiesProbabilityOutcome
- func (v *GetForecastsForecastsForecastEstimatesEstimateProbabilitiesProbabilityOutcome) GetCorrect() bool
- func (v *GetForecastsForecastsForecastEstimatesEstimateProbabilitiesProbabilityOutcome) GetId() string
- func (v *GetForecastsForecastsForecastEstimatesEstimateProbabilitiesProbabilityOutcome) GetText() string
- type GetForecastsResponse
- type GetMetadataMetadata
- type GetMetadataResponse
- type NewEstimate
- type NewForecast
- type NewOutcome
- type NewProbability
- type Resolution
- type ResolveForecastResolveForecast
- func (v *ResolveForecastResolveForecast) GetCloses() *time.Time
- func (v *ResolveForecastResolveForecast) GetEstimates() []*ResolveForecastResolveForecastEstimatesEstimate
- func (v *ResolveForecastResolveForecast) GetId() string
- func (v *ResolveForecastResolveForecast) GetResolution() Resolution
- func (v *ResolveForecastResolveForecast) GetResolves() time.Time
- func (v *ResolveForecastResolveForecast) GetTitle() string
- type ResolveForecastResolveForecastEstimatesEstimate
- func (v *ResolveForecastResolveForecastEstimatesEstimate) GetBrierScore() *float64
- func (v *ResolveForecastResolveForecastEstimatesEstimate) GetCreated() time.Time
- func (v *ResolveForecastResolveForecastEstimatesEstimate) GetId() string
- func (v *ResolveForecastResolveForecastEstimatesEstimate) GetProbabilities() []*ResolveForecastResolveForecastEstimatesEstimateProbabilitiesProbability
- func (v *ResolveForecastResolveForecastEstimatesEstimate) GetReason() string
- type ResolveForecastResolveForecastEstimatesEstimateProbabilitiesProbability
- type ResolveForecastResolveForecastEstimatesEstimateProbabilitiesProbabilityOutcome
- func (v *ResolveForecastResolveForecastEstimatesEstimateProbabilitiesProbabilityOutcome) GetCorrect() bool
- func (v *ResolveForecastResolveForecastEstimatesEstimateProbabilitiesProbabilityOutcome) GetId() string
- func (v *ResolveForecastResolveForecastEstimatesEstimateProbabilitiesProbabilityOutcome) GetText() string
- type ResolveForecastResponse
Constants ¶
const CreateForecast_Operation = `` /* 337-byte string literal not displayed */
The query or mutation executed by CreateForecast.
const GetForecasts_Operation = `` /* 227-byte string literal not displayed */
The query or mutation executed by GetForecasts.
const GetMetadata_Operation = `
query GetMetadata {
metadata {
version
}
}
`
The query or mutation executed by GetMetadata.
const ResolveForecast_Operation = `` /* 393-byte string literal not displayed */
The query or mutation executed by ResolveForecast.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CreateForecastCreateForecast ¶
type CreateForecastCreateForecast struct { Id string `json:"id"` Title string `json:"title"` Description string `json:"description"` Created time.Time `json:"created"` // The point in time at which you predict you will be able to resolve whether // how the forecast resolved. Resolves time.Time `json:"resolves"` // The point in time at which you no longer want to update your probability // estimates for the forecast. In most cases you won't need this. One example // where you might is when you want to predict the outcome of an exam. You may // want to set 'closes' to the time right before the exam starts, even though // 'resolves' is several weeks later (when the exam results are published). This // way your prediction history will only reflect your estimations before you // took the exam, which is something you may want (or not, in which case you // could simply not set 'closes'). Closes *time.Time `json:"closes"` Estimates []*CreateForecastCreateForecastEstimatesEstimate `json:"estimates"` }
CreateForecastCreateForecast includes the requested fields of the GraphQL type Forecast. The GraphQL type's documentation follows.
A prediction about the future.
func (*CreateForecastCreateForecast) GetCloses ¶
func (v *CreateForecastCreateForecast) GetCloses() *time.Time
GetCloses returns CreateForecastCreateForecast.Closes, and is useful for accessing the field via an interface.
func (*CreateForecastCreateForecast) GetCreated ¶
func (v *CreateForecastCreateForecast) GetCreated() time.Time
GetCreated returns CreateForecastCreateForecast.Created, and is useful for accessing the field via an interface.
func (*CreateForecastCreateForecast) GetDescription ¶
func (v *CreateForecastCreateForecast) GetDescription() string
GetDescription returns CreateForecastCreateForecast.Description, and is useful for accessing the field via an interface.
func (*CreateForecastCreateForecast) GetEstimates ¶
func (v *CreateForecastCreateForecast) GetEstimates() []*CreateForecastCreateForecastEstimatesEstimate
GetEstimates returns CreateForecastCreateForecast.Estimates, and is useful for accessing the field via an interface.
func (*CreateForecastCreateForecast) GetId ¶
func (v *CreateForecastCreateForecast) GetId() string
GetId returns CreateForecastCreateForecast.Id, and is useful for accessing the field via an interface.
func (*CreateForecastCreateForecast) GetResolves ¶
func (v *CreateForecastCreateForecast) GetResolves() time.Time
GetResolves returns CreateForecastCreateForecast.Resolves, and is useful for accessing the field via an interface.
func (*CreateForecastCreateForecast) GetTitle ¶
func (v *CreateForecastCreateForecast) GetTitle() string
GetTitle returns CreateForecastCreateForecast.Title, and is useful for accessing the field via an interface.
type CreateForecastCreateForecastEstimatesEstimate ¶
type CreateForecastCreateForecastEstimatesEstimate struct { Id string `json:"id"` Created time.Time `json:"created"` Reason string `json:"reason"` Probabilities []*CreateForecastCreateForecastEstimatesEstimateProbabilitiesProbability `json:"probabilities"` }
CreateForecastCreateForecastEstimatesEstimate includes the requested fields of the GraphQL type Estimate. The GraphQL type's documentation follows.
A list of probabilities (one for each outcome) together with a timestamp and an explanation why you made this estimate. Every time you change your mind about a forecast you will create a new Estimate. All probabilities always add up to 100.
func (*CreateForecastCreateForecastEstimatesEstimate) GetCreated ¶
func (v *CreateForecastCreateForecastEstimatesEstimate) GetCreated() time.Time
GetCreated returns CreateForecastCreateForecastEstimatesEstimate.Created, and is useful for accessing the field via an interface.
func (*CreateForecastCreateForecastEstimatesEstimate) GetId ¶
func (v *CreateForecastCreateForecastEstimatesEstimate) GetId() string
GetId returns CreateForecastCreateForecastEstimatesEstimate.Id, and is useful for accessing the field via an interface.
func (*CreateForecastCreateForecastEstimatesEstimate) GetProbabilities ¶
func (v *CreateForecastCreateForecastEstimatesEstimate) GetProbabilities() []*CreateForecastCreateForecastEstimatesEstimateProbabilitiesProbability
GetProbabilities returns CreateForecastCreateForecastEstimatesEstimate.Probabilities, and is useful for accessing the field via an interface.
func (*CreateForecastCreateForecastEstimatesEstimate) GetReason ¶
func (v *CreateForecastCreateForecastEstimatesEstimate) GetReason() string
GetReason returns CreateForecastCreateForecastEstimatesEstimate.Reason, and is useful for accessing the field via an interface.
type CreateForecastCreateForecastEstimatesEstimateProbabilitiesProbability ¶
type CreateForecastCreateForecastEstimatesEstimateProbabilitiesProbability struct { Id string `json:"id"` Value int `json:"value"` Outcome CreateForecastCreateForecastEstimatesEstimateProbabilitiesProbabilityOutcome `json:"outcome"` }
CreateForecastCreateForecastEstimatesEstimateProbabilitiesProbability includes the requested fields of the GraphQL type Probability. The GraphQL type's documentation follows.
A number between 0 and 100 tied to a specific Outcome. It is always part of an Estimate.
func (*CreateForecastCreateForecastEstimatesEstimateProbabilitiesProbability) GetId ¶
func (v *CreateForecastCreateForecastEstimatesEstimateProbabilitiesProbability) GetId() string
GetId returns CreateForecastCreateForecastEstimatesEstimateProbabilitiesProbability.Id, and is useful for accessing the field via an interface.
func (*CreateForecastCreateForecastEstimatesEstimateProbabilitiesProbability) GetOutcome ¶
func (v *CreateForecastCreateForecastEstimatesEstimateProbabilitiesProbability) GetOutcome() CreateForecastCreateForecastEstimatesEstimateProbabilitiesProbabilityOutcome
GetOutcome returns CreateForecastCreateForecastEstimatesEstimateProbabilitiesProbability.Outcome, and is useful for accessing the field via an interface.
func (*CreateForecastCreateForecastEstimatesEstimateProbabilitiesProbability) GetValue ¶
func (v *CreateForecastCreateForecastEstimatesEstimateProbabilitiesProbability) GetValue() int
GetValue returns CreateForecastCreateForecastEstimatesEstimateProbabilitiesProbability.Value, and is useful for accessing the field via an interface.
type CreateForecastCreateForecastEstimatesEstimateProbabilitiesProbabilityOutcome ¶
type CreateForecastCreateForecastEstimatesEstimateProbabilitiesProbabilityOutcome struct { Id string `json:"id"` Text string `json:"text"` Correct bool `json:"correct"` }
CreateForecastCreateForecastEstimatesEstimateProbabilitiesProbabilityOutcome includes the requested fields of the GraphQL type Outcome. The GraphQL type's documentation follows.
The possible results of a forecast. In the simplest case you will only have two outcomes: Yes and No.
func (*CreateForecastCreateForecastEstimatesEstimateProbabilitiesProbabilityOutcome) GetCorrect ¶
func (v *CreateForecastCreateForecastEstimatesEstimateProbabilitiesProbabilityOutcome) GetCorrect() bool
GetCorrect returns CreateForecastCreateForecastEstimatesEstimateProbabilitiesProbabilityOutcome.Correct, and is useful for accessing the field via an interface.
func (*CreateForecastCreateForecastEstimatesEstimateProbabilitiesProbabilityOutcome) GetId ¶
func (v *CreateForecastCreateForecastEstimatesEstimateProbabilitiesProbabilityOutcome) GetId() string
GetId returns CreateForecastCreateForecastEstimatesEstimateProbabilitiesProbabilityOutcome.Id, and is useful for accessing the field via an interface.
func (*CreateForecastCreateForecastEstimatesEstimateProbabilitiesProbabilityOutcome) GetText ¶
func (v *CreateForecastCreateForecastEstimatesEstimateProbabilitiesProbabilityOutcome) GetText() string
GetText returns CreateForecastCreateForecastEstimatesEstimateProbabilitiesProbabilityOutcome.Text, and is useful for accessing the field via an interface.
type CreateForecastResponse ¶
type CreateForecastResponse struct {
CreateForecast CreateForecastCreateForecast `json:"createForecast"`
}
CreateForecastResponse is returned by CreateForecast on success.
func CreateForecast ¶
func CreateForecast( ctx context.Context, client graphql.Client, forecast NewForecast, estimate NewEstimate, ) (*CreateForecastResponse, error)
func (*CreateForecastResponse) GetCreateForecast ¶
func (v *CreateForecastResponse) GetCreateForecast() CreateForecastCreateForecast
GetCreateForecast returns CreateForecastResponse.CreateForecast, and is useful for accessing the field via an interface.
type GetForecastsForecastsForecast ¶
type GetForecastsForecastsForecast struct { Id string `json:"id"` Created time.Time `json:"created"` Title string `json:"title"` Resolution Resolution `json:"resolution"` // The point in time at which you predict you will be able to resolve whether // how the forecast resolved. Resolves time.Time `json:"resolves"` // The point in time at which you no longer want to update your probability // estimates for the forecast. In most cases you won't need this. One example // where you might is when you want to predict the outcome of an exam. You may // want to set 'closes' to the time right before the exam starts, even though // 'resolves' is several weeks later (when the exam results are published). This // way your prediction history will only reflect your estimations before you // took the exam, which is something you may want (or not, in which case you // could simply not set 'closes'). Closes *time.Time `json:"closes"` Estimates []*GetForecastsForecastsForecastEstimatesEstimate `json:"estimates"` }
GetForecastsForecastsForecast includes the requested fields of the GraphQL type Forecast. The GraphQL type's documentation follows.
A prediction about the future.
func (*GetForecastsForecastsForecast) GetCloses ¶
func (v *GetForecastsForecastsForecast) GetCloses() *time.Time
GetCloses returns GetForecastsForecastsForecast.Closes, and is useful for accessing the field via an interface.
func (*GetForecastsForecastsForecast) GetCreated ¶
func (v *GetForecastsForecastsForecast) GetCreated() time.Time
GetCreated returns GetForecastsForecastsForecast.Created, and is useful for accessing the field via an interface.
func (*GetForecastsForecastsForecast) GetEstimates ¶
func (v *GetForecastsForecastsForecast) GetEstimates() []*GetForecastsForecastsForecastEstimatesEstimate
GetEstimates returns GetForecastsForecastsForecast.Estimates, and is useful for accessing the field via an interface.
func (*GetForecastsForecastsForecast) GetId ¶
func (v *GetForecastsForecastsForecast) GetId() string
GetId returns GetForecastsForecastsForecast.Id, and is useful for accessing the field via an interface.
func (*GetForecastsForecastsForecast) GetResolution ¶
func (v *GetForecastsForecastsForecast) GetResolution() Resolution
GetResolution returns GetForecastsForecastsForecast.Resolution, and is useful for accessing the field via an interface.
func (*GetForecastsForecastsForecast) GetResolves ¶
func (v *GetForecastsForecastsForecast) GetResolves() time.Time
GetResolves returns GetForecastsForecastsForecast.Resolves, and is useful for accessing the field via an interface.
func (*GetForecastsForecastsForecast) GetTitle ¶
func (v *GetForecastsForecastsForecast) GetTitle() string
GetTitle returns GetForecastsForecastsForecast.Title, and is useful for accessing the field via an interface.
type GetForecastsForecastsForecastEstimatesEstimate ¶
type GetForecastsForecastsForecastEstimatesEstimate struct { Id string `json:"id"` Created time.Time `json:"created"` BrierScore *float64 `json:"brierScore"` Probabilities []*GetForecastsForecastsForecastEstimatesEstimateProbabilitiesProbability `json:"probabilities"` }
GetForecastsForecastsForecastEstimatesEstimate includes the requested fields of the GraphQL type Estimate. The GraphQL type's documentation follows.
A list of probabilities (one for each outcome) together with a timestamp and an explanation why you made this estimate. Every time you change your mind about a forecast you will create a new Estimate. All probabilities always add up to 100.
func (*GetForecastsForecastsForecastEstimatesEstimate) GetBrierScore ¶ added in v0.3.0
func (v *GetForecastsForecastsForecastEstimatesEstimate) GetBrierScore() *float64
GetBrierScore returns GetForecastsForecastsForecastEstimatesEstimate.BrierScore, and is useful for accessing the field via an interface.
func (*GetForecastsForecastsForecastEstimatesEstimate) GetCreated ¶
func (v *GetForecastsForecastsForecastEstimatesEstimate) GetCreated() time.Time
GetCreated returns GetForecastsForecastsForecastEstimatesEstimate.Created, and is useful for accessing the field via an interface.
func (*GetForecastsForecastsForecastEstimatesEstimate) GetId ¶
func (v *GetForecastsForecastsForecastEstimatesEstimate) GetId() string
GetId returns GetForecastsForecastsForecastEstimatesEstimate.Id, and is useful for accessing the field via an interface.
func (*GetForecastsForecastsForecastEstimatesEstimate) GetProbabilities ¶
func (v *GetForecastsForecastsForecastEstimatesEstimate) GetProbabilities() []*GetForecastsForecastsForecastEstimatesEstimateProbabilitiesProbability
GetProbabilities returns GetForecastsForecastsForecastEstimatesEstimate.Probabilities, and is useful for accessing the field via an interface.
type GetForecastsForecastsForecastEstimatesEstimateProbabilitiesProbability ¶
type GetForecastsForecastsForecastEstimatesEstimateProbabilitiesProbability struct { Id string `json:"id"` Outcome GetForecastsForecastsForecastEstimatesEstimateProbabilitiesProbabilityOutcome `json:"outcome"` }
GetForecastsForecastsForecastEstimatesEstimateProbabilitiesProbability includes the requested fields of the GraphQL type Probability. The GraphQL type's documentation follows.
A number between 0 and 100 tied to a specific Outcome. It is always part of an Estimate.
func (*GetForecastsForecastsForecastEstimatesEstimateProbabilitiesProbability) GetId ¶
func (v *GetForecastsForecastsForecastEstimatesEstimateProbabilitiesProbability) GetId() string
GetId returns GetForecastsForecastsForecastEstimatesEstimateProbabilitiesProbability.Id, and is useful for accessing the field via an interface.
func (*GetForecastsForecastsForecastEstimatesEstimateProbabilitiesProbability) GetOutcome ¶
func (v *GetForecastsForecastsForecastEstimatesEstimateProbabilitiesProbability) GetOutcome() GetForecastsForecastsForecastEstimatesEstimateProbabilitiesProbabilityOutcome
GetOutcome returns GetForecastsForecastsForecastEstimatesEstimateProbabilitiesProbability.Outcome, and is useful for accessing the field via an interface.
type GetForecastsForecastsForecastEstimatesEstimateProbabilitiesProbabilityOutcome ¶
type GetForecastsForecastsForecastEstimatesEstimateProbabilitiesProbabilityOutcome struct { Id string `json:"id"` Text string `json:"text"` Correct bool `json:"correct"` }
GetForecastsForecastsForecastEstimatesEstimateProbabilitiesProbabilityOutcome includes the requested fields of the GraphQL type Outcome. The GraphQL type's documentation follows.
The possible results of a forecast. In the simplest case you will only have two outcomes: Yes and No.
func (*GetForecastsForecastsForecastEstimatesEstimateProbabilitiesProbabilityOutcome) GetCorrect ¶
func (v *GetForecastsForecastsForecastEstimatesEstimateProbabilitiesProbabilityOutcome) GetCorrect() bool
GetCorrect returns GetForecastsForecastsForecastEstimatesEstimateProbabilitiesProbabilityOutcome.Correct, and is useful for accessing the field via an interface.
func (*GetForecastsForecastsForecastEstimatesEstimateProbabilitiesProbabilityOutcome) GetId ¶
func (v *GetForecastsForecastsForecastEstimatesEstimateProbabilitiesProbabilityOutcome) GetId() string
GetId returns GetForecastsForecastsForecastEstimatesEstimateProbabilitiesProbabilityOutcome.Id, and is useful for accessing the field via an interface.
func (*GetForecastsForecastsForecastEstimatesEstimateProbabilitiesProbabilityOutcome) GetText ¶
func (v *GetForecastsForecastsForecastEstimatesEstimateProbabilitiesProbabilityOutcome) GetText() string
GetText returns GetForecastsForecastsForecastEstimatesEstimateProbabilitiesProbabilityOutcome.Text, and is useful for accessing the field via an interface.
type GetForecastsResponse ¶
type GetForecastsResponse struct {
Forecasts []GetForecastsForecastsForecast `json:"forecasts"`
}
GetForecastsResponse is returned by GetForecasts on success.
func GetForecasts ¶
func (*GetForecastsResponse) GetForecasts ¶
func (v *GetForecastsResponse) GetForecasts() []GetForecastsForecastsForecast
GetForecasts returns GetForecastsResponse.Forecasts, and is useful for accessing the field via an interface.
type GetMetadataMetadata ¶
type GetMetadataMetadata struct {
Version string `json:"version"`
}
GetMetadataMetadata includes the requested fields of the GraphQL type Metadata. The GraphQL type's documentation follows.
Information about the application itself e.g. the current version.
func (*GetMetadataMetadata) GetVersion ¶
func (v *GetMetadataMetadata) GetVersion() string
GetVersion returns GetMetadataMetadata.Version, and is useful for accessing the field via an interface.
type GetMetadataResponse ¶
type GetMetadataResponse struct {
Metadata GetMetadataMetadata `json:"metadata"`
}
GetMetadataResponse is returned by GetMetadata on success.
func GetMetadata ¶
func (*GetMetadataResponse) GetMetadata ¶
func (v *GetMetadataResponse) GetMetadata() GetMetadataMetadata
GetMetadata returns GetMetadataResponse.Metadata, and is useful for accessing the field via an interface.
type NewEstimate ¶
type NewEstimate struct { Reason string `json:"reason"` Probabilities []NewProbability `json:"probabilities"` // An optional date in the past when you created this estimate. This can be // useful for cases when you wrote it down on a piece of paper or when importing // from other software. When creating a new Forecast this value will be for // the first Estimate (which will get the same timestamp as the // Forecast.Created). Created *time.Time `json:"created"` }
func (*NewEstimate) GetCreated ¶
func (v *NewEstimate) GetCreated() *time.Time
GetCreated returns NewEstimate.Created, and is useful for accessing the field via an interface.
func (*NewEstimate) GetProbabilities ¶
func (v *NewEstimate) GetProbabilities() []NewProbability
GetProbabilities returns NewEstimate.Probabilities, and is useful for accessing the field via an interface.
func (*NewEstimate) GetReason ¶
func (v *NewEstimate) GetReason() string
GetReason returns NewEstimate.Reason, and is useful for accessing the field via an interface.
type NewForecast ¶
type NewForecast struct { Title string `json:"title"` Description string `json:"description"` Resolves time.Time `json:"resolves"` Closes *time.Time `json:"closes"` // An optional date in the past when you created this forecast. This can be // useful for cases when you wrote it down on a piece of paper or when importing // from other software. Created *time.Time `json:"created"` }
func (*NewForecast) GetCloses ¶
func (v *NewForecast) GetCloses() *time.Time
GetCloses returns NewForecast.Closes, and is useful for accessing the field via an interface.
func (*NewForecast) GetCreated ¶
func (v *NewForecast) GetCreated() *time.Time
GetCreated returns NewForecast.Created, and is useful for accessing the field via an interface.
func (*NewForecast) GetDescription ¶
func (v *NewForecast) GetDescription() string
GetDescription returns NewForecast.Description, and is useful for accessing the field via an interface.
func (*NewForecast) GetResolves ¶
func (v *NewForecast) GetResolves() time.Time
GetResolves returns NewForecast.Resolves, and is useful for accessing the field via an interface.
func (*NewForecast) GetTitle ¶
func (v *NewForecast) GetTitle() string
GetTitle returns NewForecast.Title, and is useful for accessing the field via an interface.
type NewOutcome ¶
type NewOutcome struct {
Text string `json:"text"`
}
func (*NewOutcome) GetText ¶
func (v *NewOutcome) GetText() string
GetText returns NewOutcome.Text, and is useful for accessing the field via an interface.
type NewProbability ¶
type NewProbability struct { Value int `json:"value"` Outcome NewOutcome `json:"outcome"` }
func (*NewProbability) GetOutcome ¶
func (v *NewProbability) GetOutcome() NewOutcome
GetOutcome returns NewProbability.Outcome, and is useful for accessing the field via an interface.
func (*NewProbability) GetValue ¶
func (v *NewProbability) GetValue() int
GetValue returns NewProbability.Value, and is useful for accessing the field via an interface.
type Resolution ¶
type Resolution string
const ( ResolutionResolved Resolution = "RESOLVED" ResolutionNotApplicable Resolution = "NOT_APPLICABLE" ResolutionUnresolved Resolution = "UNRESOLVED" )
type ResolveForecastResolveForecast ¶
type ResolveForecastResolveForecast struct { Id string `json:"id"` Title string `json:"title"` Resolution Resolution `json:"resolution"` // The point in time at which you predict you will be able to resolve whether // how the forecast resolved. Resolves time.Time `json:"resolves"` // The point in time at which you no longer want to update your probability // estimates for the forecast. In most cases you won't need this. One example // where you might is when you want to predict the outcome of an exam. You may // want to set 'closes' to the time right before the exam starts, even though // 'resolves' is several weeks later (when the exam results are published). This // way your prediction history will only reflect your estimations before you // took the exam, which is something you may want (or not, in which case you // could simply not set 'closes'). Closes *time.Time `json:"closes"` Estimates []*ResolveForecastResolveForecastEstimatesEstimate `json:"estimates"` }
ResolveForecastResolveForecast includes the requested fields of the GraphQL type Forecast. The GraphQL type's documentation follows.
A prediction about the future.
func (*ResolveForecastResolveForecast) GetCloses ¶
func (v *ResolveForecastResolveForecast) GetCloses() *time.Time
GetCloses returns ResolveForecastResolveForecast.Closes, and is useful for accessing the field via an interface.
func (*ResolveForecastResolveForecast) GetEstimates ¶
func (v *ResolveForecastResolveForecast) GetEstimates() []*ResolveForecastResolveForecastEstimatesEstimate
GetEstimates returns ResolveForecastResolveForecast.Estimates, and is useful for accessing the field via an interface.
func (*ResolveForecastResolveForecast) GetId ¶
func (v *ResolveForecastResolveForecast) GetId() string
GetId returns ResolveForecastResolveForecast.Id, and is useful for accessing the field via an interface.
func (*ResolveForecastResolveForecast) GetResolution ¶
func (v *ResolveForecastResolveForecast) GetResolution() Resolution
GetResolution returns ResolveForecastResolveForecast.Resolution, and is useful for accessing the field via an interface.
func (*ResolveForecastResolveForecast) GetResolves ¶
func (v *ResolveForecastResolveForecast) GetResolves() time.Time
GetResolves returns ResolveForecastResolveForecast.Resolves, and is useful for accessing the field via an interface.
func (*ResolveForecastResolveForecast) GetTitle ¶
func (v *ResolveForecastResolveForecast) GetTitle() string
GetTitle returns ResolveForecastResolveForecast.Title, and is useful for accessing the field via an interface.
type ResolveForecastResolveForecastEstimatesEstimate ¶
type ResolveForecastResolveForecastEstimatesEstimate struct { Id string `json:"id"` Created time.Time `json:"created"` Reason string `json:"reason"` BrierScore *float64 `json:"brierScore"` Probabilities []*ResolveForecastResolveForecastEstimatesEstimateProbabilitiesProbability `json:"probabilities"` }
ResolveForecastResolveForecastEstimatesEstimate includes the requested fields of the GraphQL type Estimate. The GraphQL type's documentation follows.
A list of probabilities (one for each outcome) together with a timestamp and an explanation why you made this estimate. Every time you change your mind about a forecast you will create a new Estimate. All probabilities always add up to 100.
func (*ResolveForecastResolveForecastEstimatesEstimate) GetBrierScore ¶ added in v0.3.0
func (v *ResolveForecastResolveForecastEstimatesEstimate) GetBrierScore() *float64
GetBrierScore returns ResolveForecastResolveForecastEstimatesEstimate.BrierScore, and is useful for accessing the field via an interface.
func (*ResolveForecastResolveForecastEstimatesEstimate) GetCreated ¶ added in v0.3.0
func (v *ResolveForecastResolveForecastEstimatesEstimate) GetCreated() time.Time
GetCreated returns ResolveForecastResolveForecastEstimatesEstimate.Created, and is useful for accessing the field via an interface.
func (*ResolveForecastResolveForecastEstimatesEstimate) GetId ¶
func (v *ResolveForecastResolveForecastEstimatesEstimate) GetId() string
GetId returns ResolveForecastResolveForecastEstimatesEstimate.Id, and is useful for accessing the field via an interface.
func (*ResolveForecastResolveForecastEstimatesEstimate) GetProbabilities ¶
func (v *ResolveForecastResolveForecastEstimatesEstimate) GetProbabilities() []*ResolveForecastResolveForecastEstimatesEstimateProbabilitiesProbability
GetProbabilities returns ResolveForecastResolveForecastEstimatesEstimate.Probabilities, and is useful for accessing the field via an interface.
func (*ResolveForecastResolveForecastEstimatesEstimate) GetReason ¶ added in v0.3.0
func (v *ResolveForecastResolveForecastEstimatesEstimate) GetReason() string
GetReason returns ResolveForecastResolveForecastEstimatesEstimate.Reason, and is useful for accessing the field via an interface.
type ResolveForecastResolveForecastEstimatesEstimateProbabilitiesProbability ¶
type ResolveForecastResolveForecastEstimatesEstimateProbabilitiesProbability struct { Id string `json:"id"` Outcome ResolveForecastResolveForecastEstimatesEstimateProbabilitiesProbabilityOutcome `json:"outcome"` }
ResolveForecastResolveForecastEstimatesEstimateProbabilitiesProbability includes the requested fields of the GraphQL type Probability. The GraphQL type's documentation follows.
A number between 0 and 100 tied to a specific Outcome. It is always part of an Estimate.
func (*ResolveForecastResolveForecastEstimatesEstimateProbabilitiesProbability) GetId ¶
GetId returns ResolveForecastResolveForecastEstimatesEstimateProbabilitiesProbability.Id, and is useful for accessing the field via an interface.
func (*ResolveForecastResolveForecastEstimatesEstimateProbabilitiesProbability) GetOutcome ¶
func (v *ResolveForecastResolveForecastEstimatesEstimateProbabilitiesProbability) GetOutcome() ResolveForecastResolveForecastEstimatesEstimateProbabilitiesProbabilityOutcome
GetOutcome returns ResolveForecastResolveForecastEstimatesEstimateProbabilitiesProbability.Outcome, and is useful for accessing the field via an interface.
type ResolveForecastResolveForecastEstimatesEstimateProbabilitiesProbabilityOutcome ¶
type ResolveForecastResolveForecastEstimatesEstimateProbabilitiesProbabilityOutcome struct { Id string `json:"id"` Text string `json:"text"` Correct bool `json:"correct"` }
ResolveForecastResolveForecastEstimatesEstimateProbabilitiesProbabilityOutcome includes the requested fields of the GraphQL type Outcome. The GraphQL type's documentation follows.
The possible results of a forecast. In the simplest case you will only have two outcomes: Yes and No.
func (*ResolveForecastResolveForecastEstimatesEstimateProbabilitiesProbabilityOutcome) GetCorrect ¶
func (v *ResolveForecastResolveForecastEstimatesEstimateProbabilitiesProbabilityOutcome) GetCorrect() bool
GetCorrect returns ResolveForecastResolveForecastEstimatesEstimateProbabilitiesProbabilityOutcome.Correct, and is useful for accessing the field via an interface.
func (*ResolveForecastResolveForecastEstimatesEstimateProbabilitiesProbabilityOutcome) GetId ¶
func (v *ResolveForecastResolveForecastEstimatesEstimateProbabilitiesProbabilityOutcome) GetId() string
GetId returns ResolveForecastResolveForecastEstimatesEstimateProbabilitiesProbabilityOutcome.Id, and is useful for accessing the field via an interface.
func (*ResolveForecastResolveForecastEstimatesEstimateProbabilitiesProbabilityOutcome) GetText ¶
func (v *ResolveForecastResolveForecastEstimatesEstimateProbabilitiesProbabilityOutcome) GetText() string
GetText returns ResolveForecastResolveForecastEstimatesEstimateProbabilitiesProbabilityOutcome.Text, and is useful for accessing the field via an interface.
type ResolveForecastResponse ¶
type ResolveForecastResponse struct {
ResolveForecast *ResolveForecastResolveForecast `json:"resolveForecast"`
}
ResolveForecastResponse is returned by ResolveForecast on success.
func ResolveForecast ¶
func ResolveForecast( ctx context.Context, client graphql.Client, forecastId string, correctOutcomeId *string, resolution *Resolution, ) (*ResolveForecastResponse, error)
func (*ResolveForecastResponse) GetResolveForecast ¶
func (v *ResolveForecastResponse) GetResolveForecast() *ResolveForecastResolveForecast
GetResolveForecast returns ResolveForecastResponse.ResolveForecast, and is useful for accessing the field via an interface.
Directories ¶
Path | Synopsis |
---|---|
create_test_sql generates a .sql file with the complete DB state of a cleosrv instance.
|
create_test_sql generates a .sql file with the complete DB state of a cleosrv instance. |