github.com/niedbalski/juju@v0.0.0-20190215020005-8ff100488e47/core/crossmodel/params.go (about) 1 // Copyright 2015 Canonical Ltd. 2 // Licensed under the AGPLv3, see LICENCE file for details. 3 4 package crossmodel 5 6 import ( 7 "time" 8 9 "gopkg.in/juju/charm.v6" 10 11 "github.com/juju/juju/core/relation" 12 "github.com/juju/juju/permission" 13 ) 14 15 // ApplicationOfferAdminDetails represents the details about an 16 // application offer. Depending on the access permission of the 17 // user making the API call, and whether the call is "find" or "list", 18 // not all fields will be populated. 19 type ApplicationOfferDetails struct { 20 // OfferName is the name of the offer 21 OfferName string 22 23 // ApplicationName is the application name to which the offer pertains. 24 ApplicationName string 25 26 // ApplicationDescription is the application description. 27 ApplicationDescription string 28 29 // OfferURL is the URL where the offer can be located. 30 OfferURL string 31 32 // CharmURL is the URL of the charm for the remote application. 33 CharmURL string 34 35 // Endpoints are the charm endpoints supported by the application. 36 // TODO(wallyworld) - do not use charm.Relation here 37 Endpoints []charm.Relation 38 39 // Connects are the connections to the offer. 40 Connections []OfferConnection 41 42 // Users are the users able to access the offer. 43 Users []OfferUserDetails 44 } 45 46 // OfferUserDetails holds the details about a user's access to an offer. 47 type OfferUserDetails struct { 48 // UserName is the username of the user. 49 UserName string 50 51 // DisplayName is the display name of the user. 52 DisplayName string 53 54 // Access is the level of access to the offer. 55 Access permission.Access 56 } 57 58 // OfferConnection holds details about a connection to an offer. 59 type OfferConnection struct { 60 // SourceModelUUID is the UUID of the model hosting the offer. 61 SourceModelUUID string 62 63 // Username is the name of the user consuming the offer. 64 Username string 65 66 // RelationId is the id of the relation for this connection. 67 RelationId int 68 69 // Endpoint is the endpoint being connected to. 70 Endpoint string 71 72 // Status is the status of the offer connection. 73 Status relation.Status 74 75 // Message is the status message of the offer connection. 76 Message string 77 78 // Since is when the status value was last changed. 79 Since *time.Time 80 81 // IngressSubnets is the list of subnets from which traffic will originate. 82 IngressSubnets []string 83 }